提交的表單包含內(nèi)容多個(gè),怎想要實(shí)際每個(gè)內(nèi)容都實(shí)現(xiàn)點(diǎn)擊前面標(biāo)題光標(biāo)在輸入框
我在這個(gè)表單里寫(xiě)了多個(gè)內(nèi)容。只有第一個(gè)用戶(hù)名點(diǎn)擊前面文字之后光標(biāo)在輸入框?其他都沒(méi)有
<!DOCTYPE html>
<html>
<head>
? ? <meta charset="UTF-8">
? ? <title>提交按鈕</title>
</head>
<body>
? ?<form method="post" action="/.php">
? ? <label>
? ? 用戶(hù)名:<input type="text" name="wenben" placeholder="請(qǐng)輸入用戶(hù)名"? ><br/>
? ? 密 碼:<input? type="possword" name="mima" placeholder="請(qǐng)輸入密碼"><br/>
? ? 特長(zhǎng):
? ? ? ? <input type="radio" name="techang" >唱歌
? ? ? ? <input type="radio" name="techang">跳舞
? ? ? ? <input type="radio" name="techang" checked="checked">畫(huà)畫(huà)
? ? ? ? <input type="radio" name="techang">學(xué)習(xí)
? ? ? ? <br />
? ? 興趣愛(ài)好:
? ? ? ? <input type="checkbox" name="aihao">旅游
? ? <input type="checkbox" name="aihao">睡覺(jué)
? ? <input type="checkbox" name="aihao">玩耍
? ? <input type="checkbox" name="aihao" checked="checked">吃飯<br/>
? ? 地點(diǎn):
? ? <select>
? ? <option>成都</option>
? ? <option>拉薩</option>
? ? <option>重慶</option>
? ? <option selected="selected">云南</option>
? ? </select>
? ? <br/>
? ? 留下你的小意見(jiàn):<br/>
? ? <textarea placeholder="請(qǐng)輸入內(nèi)容"></textarea><br/>
? ? <input type="submit"velue="提交">
? ? </label>
? ?</form>
</body>
<?/html>
2021-04-12
你得為每一個(gè)input前面加上label標(biāo)簽? 并綁定id才行,如下示例:
<label for="wenben">用戶(hù)名:</label>
? ? <input type="text" id="wenben" name="wenben" placeholder="請(qǐng)輸入用戶(hù)名"? ><br/>
? ? <label for="mima">密 碼:</label>
? ? <input? type="possword" id="mima" name="mima" placeholder="請(qǐng)輸入密碼"><br/>
2023-12-15
你這不是剛開(kāi)始學(xué)吧?我都還看不懂你都寫(xiě)這么多了,壓力好大????