課程
/前端開(kāi)發(fā)
/HTML/CSS
/初識(shí)HTML(5)+CSS(3)-升級(jí)版
name,id,value的值如何理解,向后臺(tái)傳遞的意義?
2016-08-15
源自:初識(shí)HTML(5)+CSS(3)-升級(jí)版 6-8
正在回答
name:控件名稱
value:用戶輸入(或選擇)的值
id:用于網(wǎng)頁(yè)腳本編號(hào)(javascript)
value用來(lái)傳遞給后臺(tái)的數(shù)據(jù)不同的控件里可以設(shè)置同樣的name值,但是id的值不能設(shè)置有重復(fù)的
墨小漓
Asia愛(ài)莎 提問(wèn)者
Asia愛(ài)莎 提問(wèn)者 回復(fù) 墨小漓
墨小漓 回復(fù) Asia愛(ài)莎 提問(wèn)者
Id is used to identify the HTML element through the Document Object Model (via Javascript or styled with CSS). Id is expected to be unique within the page.
Name corresponds to the form element and identifies what is posted back to the server.
? ?
Id用于通過(guò)文檔對(duì)象模型來(lái)確定的HTML元素(通過(guò)JavaScript或CSS與樣式)。ID是預(yù)計(jì)將在頁(yè)面中是唯一的。
Name對(duì)應(yīng)的表單元素,并確定哪些是回發(fā)到服務(wù)器。
舉報(bào)
HTML(5)+CSS(3)基礎(chǔ)教程8小時(shí)帶領(lǐng)大家步步深入學(xué)習(xí)標(biāo)簽用法和意義
7 回答<input type="text" name="username" id="username" value=""/>中的name和id的意義分別怎么理解?
1 回答如何理解value?
6 回答name id value三者的區(qū)別
3 回答name,id,value三者的區(qū)別
1 回答單選框 name id value
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2016-08-15
name:控件名稱
value:用戶輸入(或選擇)的值
id:用于網(wǎng)頁(yè)腳本編號(hào)(javascript)
value用來(lái)傳遞給后臺(tái)的數(shù)據(jù)
不同的控件里可以設(shè)置同樣的name值,但是id的值不能設(shè)置有重復(fù)的
2016-08-15
Id is used to identify the HTML element through the Document Object Model (via Javascript or styled with CSS). Id is expected to be unique within the page.
Name corresponds to the form element and identifies what is posted back to the server.
? ?
Id用于通過(guò)文檔對(duì)象模型來(lái)確定的HTML元素(通過(guò)JavaScript或CSS與樣式)。ID是預(yù)計(jì)將在頁(yè)面中是唯一的。
Name對(duì)應(yīng)的表單元素,并確定哪些是回發(fā)到服務(wù)器。
? ?
? ?