Html5的表单元素

  表单是HTML中获取用户输入的手段,,对于web应用系统及其重要,文字是不能说明问题的;

直接上代码把;

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>创建表单</title>
</head>
<body>
<form>
<input type = "text"><!--空白单行框,-->
<br>
<br>
<input type = "text" value = "我是百度"><!--带字的单行框-->
<br>
<br>
<input type = "text" placeholder="密码"><!--<"密码"字体不占文本框">-->
<br>
<br>
<input type = "text" placeholder="maxlength" maxlength="8"><!--最大能输入的字串长度-->
<br>
<br>
<input type = "text" placeholder="maxlength" size="100"><!--<加宽单行文本框>-->
<br>
<br>
<input type = "text" value="只读文本框" readonly><!--<只读文本框,不可以修改>-->
<br>
<br>
<input type = "password" placeholder="密码">
<br>
<br>
<textarea rows="20">aaaaaaaaaaaa</textarea><!--<多行文本框>-->
</form>
</body>
</html>

猜你喜欢

转载自www.cnblogs.com/674001396long/p/8975930.html