亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

使用提交按鈕,提交數(shù)據(jù)

表單中有兩種按鈕可以使用,分別為:提交按鈕、重設(shè)。這一小節(jié)講解提交按鈕:當(dāng)使用者需要提交表單資訊到伺服器時(shí),需要用到提交按鈕。

文法:

<input   type="submit"   value="提交">

type:只有當(dāng)type值設(shè)定為submit時(shí),按鈕才有提交作用

value#按鈕上顯示的文字

範(fàn)例

在瀏覽器中顯示的結(jié)果:

繼續(xù)學(xué)習(xí)
||
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>提交按鈕</title> <style> h1 {text-align:center;} div {margin-left: auto; margin-right: auto; width:500px;} </style> </head> <body> <div id="top"> <img src="https://www.baidu.com/img/bdlogo.png" title="sorry圖片來(lái)源出問(wèn)題"> </div> <div id="banner"> <h1>公開(kāi)調(diào)查問(wèn)卷</h1> </div> <div id="reserch"> <form method="post" action="save.php"> <label for="myName">姓    名:</label> <input type="text" value="" name="myName " /><br /> <label for="id">身份證號(hào):</label> <input type="text" value="" name="id" /> <br /> <hr /> <label for="gender">性別:</label> <label>男</label> <input type="radio" value="1" name="gender" /> <labe >女</label> <input type="radio" value="2" name="gender" /><br> <hr /> <label>愛(ài)好:</label> <label>運(yùn)動(dòng)</label> <input type="checkbox" value="sport" name="運(yùn)動(dòng)" /> <label>唱歌</label> <input type="checkbox" value="singing" name="唱歌" /> <label>跳舞</label> <input type="checkbox" value="dacing" name="跳舞" /> <label>看書(shū)</label> <input type="checkbox" value="book" name="看書(shū)" /><br /> <hr /> <label>年齡段</label> <select> <option value="20"><20</option> <option value="30">20-40</option> <option value="40">>40</option> </select><br /> <hr /> <label>喜歡的課程:</label> <select multiple="multiple"> <option value="math">數(shù)學(xué)</option> <option value="language">語(yǔ)言</option> <option value="history">歷史</option> </select> <br /> <hr /> <input type="submit" value="提交" name="submitBtn" /> </form> </div> </body> </html>
提交重置程式碼