标签:
HTML的密码域
<html>
<body>
<form>
用户:
<input type="text" name="user">
<br>
密码:
<input type="password" name="password">
</form>
<p>
请注意,当您在密码域中键入字符时,浏览器将使用项目符号来代替这些字符。
</p>
</body>
</html>
在HTML页中创建文本框,用户可以选中或取消选取复选框
<html>
<body>
<form>
我喜欢自行车:
<input type="checkbox" name="Bike">
<br>
我喜欢汽车:
<input type="checkbox" name="Car">
</form>
</body>
</html>
<html>
<body>
<form>
男性:
<input type="radio" checked="checked" name="Sex" value="male">
<br>
女性:
<input type="radio" name="Sex" value="female">
</form>
<p>当用户点击一个单选按钮时,该按钮会变为选中状态,其他所有按钮会变为非选中状态。</p>
</body>
</html>
<html>
<body>
<form>
<select name="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="fiat" selected="selected">Fiat</option>
<option value="audi">Audi</option>
</select>
</form>
</body>
</html>
创建按钮
<html>
<body>
<form>
<input type="button" value="Hello world!">
</form>
</body>
</html>
在数据周围绘制一个带标题的框
<html>
<body>
<fieldset>
<legend>健康信息:</legend>
<form>
<label>身高:<input type="text" /></label>
<label>体重:<input type="text" /></label>
</form>
</fieldset>
<p>如果输入表单周围没有边框,说明您的浏览器太老了。</p>
</body>
</html>
从表单发送电子邮件
<html>
<body>
<form action="http:///someone@w3school.com.cn"
method="post" enctype="text/plain">
<h3>这个表单会把电子邮件发送到 W3School。</h3>
姓名:<br>
<input type="text" name="name" value="yourname" size="20">
<br>
电邮:<br>
<input type="text" name="mail" value="yourmail" size="20">
<br>
内容:<br>
<input type="text" name="comment" value="yourcomment" size="40">
<br>
<br>
<input type="submit" value="发送">
<input type="reset" value="重置">
</form>
</body>
</html>
标签:
原文地址:http://blog.csdn.net/lindonglian/article/details/45154307