兩者之間有什么區(qū)別???
<body>
<form method="post" action="save.php">
? ? ? <label for="username">用戶(hù)名:</label>
? ? ? <input type="text" ?name="username" id="username" value="" />
? ? ? <label for="pass">密碼:</label>
? ? ? <input type="password" ?name="pass" id="pass" value="" /> ? ?
</form> ?
</body>
和
<body>
<form ?method="post" action="save.php">
? ? 賬戶(hù):?
<input ?type="text" ?name="myName" />
<br>
密碼:?
? ? <input ?type="password" ?name="pass" />
</form>?
</body>
有什么區(qū)別嗎?感覺(jué)效果都差不多
2016-09-26
帶label的那個(gè)文字是可以交互的,可以點(diǎn)
不帶label就是一個(gè)單純的文字,不可以點(diǎn)不可以交互
2016-09-16
好像是這樣的
<label for="username">用戶(hù)名:</label>
<input type="text" ?name="username" id="username" value="" />
label 標(biāo)簽在用瀏覽器顯示的時(shí)候是沒(méi)有其他特別效果的。上面的lable標(biāo)簽中for和input的id是一樣的,這是把 用戶(hù)名 ?這個(gè)標(biāo)簽和input綁定了,所以當(dāng)鼠標(biāo)點(diǎn)擊這個(gè)標(biāo)簽的時(shí)候可以觸發(fā)input。
而這個(gè)
? ? 賬戶(hù):?
<input ?type="text" ?name="myName" />
就實(shí)現(xiàn)不了這個(gè)效果
2016-09-15
上面的那個(gè),可以將用戶(hù)數(shù)據(jù)通過(guò)表單傳輸?shù)胶笈_(tái),然而下面的那個(gè),沒(méi)有數(shù)據(jù)傳輸?shù)胶笈_(tái),只是一個(gè)空架子,沒(méi)有將數(shù)據(jù)傳輸?shù)胶笈_(tái)。以上個(gè)人見(jiàn)解,如有錯(cuò)誤,歡迎指正。
2016-09-15
一個(gè)能設(shè)樣式,一個(gè)不能設(shè)
2016-09-15
希望有大神來(lái)回答這個(gè)問(wèn)題,我覺(jué)得可能更方便計(jì)算機(jī)處理,因?yàn)橐灰缓蚽ame對(duì)應(yīng)