网页中的表单设计

发布时间:2025-12-09 11:53:48 浏览次数:2

在学习了最基本的网页元素后,接触到了表单,下面是用HTML写的很基础的表单,中间设计到了一点点CSS的内容,不算复杂。

<!doctype html><html><head><meta charset="utf-8"><title>表单综合实例</title><style type="text/css">input.ann{border: 2 solid #2B2727;color: antiquewhite;font-size: 12pt;height: 30px;background: #999999;}</style></head><body><form name="表单实例" method="post" action=""><table width="500" border="0" align="center" cellpadding="0" cellspacing="2"><tr><td width="143" height="25">姓名:</td><td width="351"><input name="name" type="text"  size="20"></td></tr><tr><td height="25">年龄:</td><td><select name="age" ><option value="18" selected>18</option><option value="19">19</option><option value="20">20</option><option value="21">21</option><option value="22">22</option></select></td></tr><tr><td height="25">性别:</td><td><input name="radiobutton" type="radio" value="radiobotton" checked>男<input type="radio" name="radiobutton" value="radiobutton">女</td></tr><tr><td height="25">家庭住址:</td><td><input name="textfield" type="text" size="40"></td></tr><tr><td height="25">联系电话:</td><td><input name="textfield2" type="text" size="20"></td></tr><tr><td>常用密码</td><td><input type="password" size="10" name="pwd" style="border: 2px solid red;background: red;"/></td></tr><tr><td height="25">对我们的服务是否满意:</td><td><input type="checkbox" name="checkbox1" value="checkbox" checked="checked">非常满意<input type="checkbox" name="checkbox2" value="checkbox">满意<input type="checkbox" name="checkbox3" value="checkbox">不满意</td></tr><tr><td height="25">意见:</td><td><textarea name="textarea" cols="40" rows="6"></textarea></td></tr><tr><td height="25" colspan="2" align="center"><input type="submit" name="submit1" value="提交" ><input type="reset" name="submit2" value="重置" ></td></tr></table></form></body></html>

最终结果如下:

注:样式是给提交和重置的,为了更醒目和好看点。本实例基本包括了表单的一般属性。

125511.html

网页设计表单
需要做网站?需要网络推广?欢迎咨询客户经理 13272073477