文本輸入框的問題
<form>
?姓名:
?<input type="text" name="myName">
?<br/>
?密碼:
?<input type="password" name="pass">
</form>
?在這個里面 ? ?<input type="password" name="pass"> ?最后需要 / 嗎?
<input type="password" name="pass"/>
這兩個哪個正確?還是都可以?講解里面是要 / 的 ?
<form>
?姓名:
?<input type="text" name="myName">
?<br/>
?密碼:
?<input type="password" name="pass">
</form>
?在這個里面 ? ?<input type="password" name="pass"> ?最后需要 / 嗎?
<input type="password" name="pass"/>
這兩個哪個正確?還是都可以?講解里面是要 / 的 ?
2016-08-08
舉報
2016-08-08
因?yàn)閱螛?biāo)簽要閉合,所以要結(jié)束符/
2016-08-08
加有/是正確的,因?yàn)閕nput是單標(biāo)簽所以加上/,這樣是閉合標(biāo)簽
2016-08-08
都一樣的,標(biāo)準(zhǔn)形式是<xx/>...</xx>,也可以簡略寫成<xx>...</xx>