HTML input 元素概述
HTML input 元素概述
<input>
是最为重要的表单元素。
根据type属性值的不同,它可以表现为不同形式,功能更大相径庭。
无论以何种形式展现或者何种方式使用,它的功能是输入数据。
元素的名称也可以体现它的功能,input翻译成汉语,具有输入数据的意思。
代码实例如下:
<!DOCTYPE html>
<html>
<head>
<meta charset=" utf-8">
<meta name="author" content="http://www.dandelioncloud.cn/" />
<title>蒲公英云</title>
</head>
<body>
<input type="button" name="bt" value="按钮">
<input type="checkbox" name="cb" value="1">
<input type="text" name="txt">
<input type="password" name="pw">
<input type="time" name="time">
<input type="datetime" name="datetime">
<input type="month" name="month">
<input type="date" name="date">
</body>
</html>
仅列举了一部分元素类型,根据type属性值的不同,<input>
标签的表现也大相径庭。
还没有评论,来说两句吧...