表單:用來收集用戶的信息; 1、表單框: <form name=名" method="post/get" action=""></form> 2、文本框: <input type ="text" value="預設值"> 3、密碼框: <input type ="password"/> <input ...
表單:用來收集用戶的信息;
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" 提交按鈕,起到提交信息的作用