编程题:
使用这一章学到的表单标签,制作如图9-40所示的表单页面。
用VS2013新建ASP.NET空网站,添加新项,建立HTML文件,向其加入以下代码:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form method="post">
昵称:<input type="text"/><br />
密码:<input type="password"><br />
邮箱:<input type="text"/>
<select>
<option>qq.com</option>
<option>163.com</option>
<option>126.com</option>
</select><br />
性别:
<input type="radio"name="gender"value="男"checked/>男
<input type="radio"name="gender"value="女"/>女 <br/>
爱好:
<input type="checkbox"name="hobbies"value="旅游"/>旅游
<input type="checkbox"name="hobbies"value="摄影"/>摄影
<input type="checkbox"name="hobbies"value="运动"/>运动 <br/>
个人简介:<br />
<textarea rows="10" cols="40"></textarea> <br />
上传个人照片:<br />
<input type="file"/><br />
<hr />
<input type="button"value="立即注册"/>
</form>
</body>
</html>
运行结果:
以上就是网页的效果。