信手拈来 妙手偶得 » 日志 » 【转载】不错的表单效果
【转载】不错的表单效果
Junglesong 发表于 2008-02-04 23:27:52
CSS代码:
------------------------------------
fieldset{
margin:1em 0;
padding:1em;
border:1px solid #ccc;
background:#f8f8f8;
}
legend{
font-weight:bold;
}
label{
display:block;
}
------------------------------------
页面代码:
------------------------------------
<body>
<div id="registerMsg">
<%
String msg = (String) request.getAttribute("Msg");
if (msg != null) {
out.print(msg);
}
%>
</div>
<form method=post action="ShowPage?page=registerCheck">
<table width=200>
<tr><td>
<fieldset><legend>用户注册</legend>
<p><label for="name">用户名:</label><input type="text" name="name"
value="" style="width: 200px; height: 20px" /></p>
<p><label for="pswd">密码:</label><input type="text" name="pswd"
value="" style="width: 200px; height: 20px" /></p>
<p><label for="pswd">再次输入密码:</label><input type="text" name="pswd2"
value="" style="width: 200px; height: 20px" /></p>
<p><input type="button"
value="注册" style="width: 100px; height: 25px" onclick="registerCheck()"/></p>
</fieldset>
</td></tr>
</table>
</form>
</body>
</html>
------------------------------------
效果图:

