表单

<form action="" method="get"><!-- 表单,相当于一个div ,把表单的内容矿在里面,method提交方式,用于php-->
文本框<input type="text" name="" id="" value="张三" readonly="只读" disabled="不能使用" required="提示请填写字段" /><!-- value的值是框里带着默认的 -->
密码框<input type="password" name="" value="123" /><br>


<input type="radio" name="01" id="" value="" checked />男<!-- name名一样时为一组,可单选 --> checked默认选男
<input type="radio" name="01" id="" value="" />女


<input type="button" name="" id="" value="按钮" /><!-- 按钮 上的文字写在value里面-->


<input type="checkbox" name="" id="" value="" />1<!-- 复选框,checked默认值,单选框一样 -->

<input type="checkbox" checked>2                               复选框默认选2
<input type="hidden" name="" id="" value="" /><!-- 隐藏域 -->
<select name=""><!-- 下拉框 -->
<option value="">1</option>
<option value="" selected="默认值">2</option>
<option value="">3</option>
<option value="">4</option>
<option value="">5</option>
</select>
<textarea rows="10" cols="30"></textarea><!-- 文本域,10行,30个字 -->

<input type="file" name="" id="" value="" /><!-- 选择文件 按钮-->
<input type="submit" name="" id="" value="提交" /><!-- 提交按钮 -->
<input type="reset" name="" id="" value="重置" /><!-- 重置按钮 -->
文本框<input type="text" required="required" name="" id="" value="" />              如果文本空着,提示请填写
<input type="text" name="" id="" value="zhangsan" readonly="readonly" />        知能读不能写
<input type="text" name="" id="" value="zhangsan" disabled="disabled" />         不能使用
<input type="range" name="" id="" value="" />  调节大小列表
<input type="date" name="" id="" value="" />  显示日历列表
<input type="week" name="" id="" value="" />  显示周历列表
<input type="email" name="" id="" value="" />  如果文本不是email格式自动提示按格式写
<input type="tel" name="" id="" value="" placeholder="提示文字" />
文本中placeholder标签显示提示文字,输入文字时自动消失

原文地址:https://www.cnblogs.com/111wdh/p/12691755.html