表单部分属性值

表单:用来收集用户的信息;

1、表单框:

<form name=名" method="post/get" action=""></form>

2、文本框:

<input type ="text" value="默认值">

3、密码框:

<input type ="password"/>

<input type="password" placeholder="密码"/>

4、重置密码:

<input type="rest" value="按钮内容"/>

5、单选框/单选按钮

<input type="radio" name="ral"/>

<input type="radio" name="ral" checked="checked"/>

单选按钮里name属性必须写,同一组单选按钮的name属性值必须一样

checked="chaecked"(默认选中,单选、多选都行)

disabled="disabled"(被禁用)

6、多(复)选框:type="checkbox"

7、下拉菜单:

<select name="">
<option>菜单内容</option>
</select>

下拉中的selected为默认选中(可能不兼容)

8、多行文本框(文本域)

<textarea name="textareal" cols="字符宽度" rows="行数">
</textarea>

加上  resize:none 禁止用户修改文本域的大小

9、按钮:

type="button" 只起到跳转的作用,不提交(空按钮)

type="submit" 提交按钮,起到提交信息的作用

原文地址:https://www.cnblogs.com/21-forever/p/10851324.html