單行文本框的格式:
<input type=text name="名稱" size="數(shù)值" value="預設內容" maxlength="數(shù)值">
密碼框格式:
<input type=password name="名稱" size="數(shù)值" value="預設內容" maxlength="數(shù)值">
提交按鈕:
<input type=submit name="名稱" value="預設內容">
圖片提交:
<input type=image src="圖片路徑" name="名稱" alt="替代文本" width="寬度" height="高度">
其中alt是指在光標經過圖像或者圖像不顯示時的替換文本
重置按鈕格式:
<input type="reset" name="名稱" value="預設內容">
普通按鈕格式:
<input type="button" name="名稱" value="預設內容">
其可以和Javascript一塊使用,如:
<input type="button" name="button1" value="單擊進入" onclick="alert('單擊按鈕')">
隱藏元素按鈕:
<input type="hidden" name="參數(shù)" value="參數(shù)取值">
功能:多用于向服務器傳遞一些不需要用戶所知道的一些信息,如IP地址。
單選按鈕格式:
<input type="radio" name="名稱" value="預設內容" checked="checked">
復選框格式:
<input type="checkbox" name="名稱" value="預設內容" checked="checked">
下拉列表格式:
<select name="名稱" size="大小" multiple="multiple">
<option value=""></option>
<option value=""></option>
</select>
多行文本框格式:
<textarea name="名稱" rows="行數(shù)" cols="列數(shù)"></textarea>