代碼如下:
html head title form表單的使用 /title !-- 標(biāo)簽名稱:form 表單標(biāo)簽 屬性:action:提交的去向,目標(biāo)地址的url method:設(shè)置提交請求的方式,get和post;默認(rèn)為get get和post提交有什么區(qū)別?------------------------ get傳輸:將內(nèi)容信息放在地址欄傳輸,而且長度限制在1k,而且安全性不好。 post傳輸:將內(nèi)容房子body信息中傳輸。沒有長度限制。 子標(biāo)簽: input標(biāo)簽:需要提交其中的value,必須有一個(gè)name屬性。 屬性:type:password 等 //------------ 通過下面的實(shí)例的演示,發(fā)現(xiàn)在某些情況下可以用form去做鏈接,而且做鏈接的同時(shí)還能提交數(shù)據(jù)到 這個(gè)目標(biāo)的地址文件上。 fieldset標(biāo)簽:定義域 legend標(biāo)簽:定義域的標(biāo)題 /head body fieldset legend form表單標(biāo)簽,子標(biāo)簽實(shí)例: /legend form action= 01列表.html method= get table border= 1px width= 800px 列表標(biāo)簽: select name= cars option value= volvo Volvo /option option value= saab Saab /option option value= fiat selected= selected Fiat /option option value= audi Audi /option /select /tr 復(fù)選框?qū)嵗何蚁矚g自行車: input type= checkbox name= Bike 我喜歡汽車: input type= checkbox name= Car /tr 單選按鈕: input type= radio checked= checked name= Sex value= male input type= radio name= Sex value= female /form p 當(dāng)用戶點(diǎn)擊一個(gè)單選按鈕時(shí),該按鈕會變?yōu)檫x中狀態(tài),其他所有按鈕會變?yōu)榉沁x中狀態(tài)。 /p /tr textarea rows= 10 cols= 30 文本域標(biāo)簽的使用 /textarea /tr /tr /tr td 賬號: /td input name= userid /td /tr td 密碼: /td input name= pwd /td /tr input type= submit value= 確認(rèn)提交 / /td input type= reset value= 重置 / /td /tr /table /form /fieldset /body /html
只要是有name和value屬性的標(biāo)簽都可以放在form內(nèi)部,同時(shí)也可以將這些標(biāo)簽的數(shù)據(jù)提交到另一個(gè)url。
以上就是HTML的表單form以及form內(nèi)部標(biāo)簽的使用的詳細(xì)內(nèi)容,html教程
鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時(shí)間聯(lián)系我們修改或刪除,多謝。
新聞熱點(diǎn)
疑難解答
圖片精選