課程
/前端開發(fā)
/HTML/CSS
/初識(shí)HTML(5)+CSS(3)-升級版
在很多網(wǎng)站上的文本框輸入內(nèi)容時(shí),“在這里輸入內(nèi)容”這幾個(gè)字會(huì)自己消失了,不用自己手動(dòng)刪除,是怎么做到的。求大神
2016-06-20
源自:初識(shí)HTML(5)+CSS(3)-升級版 6-7
正在回答
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>文本域</title>
</head>
<body>
<form action="save.php" method="post" >
? ? <label>個(gè)人簡介:</label>
? ? <textarea style="font-size:20px" cols="50" rows="10" ?placeholder="在這里輸入內(nèi)容" ></textarea>
? ? <input type="submit" value="確定" ?name="submit" ?placeholder="在這里輸入內(nèi)容" />
? ? <input type="reset" value="重置" ?name="reset" />
</form>?
</body>
</html>
對嗎。。
設(shè)置input的placeholder,例如<input type="text" name="ssk" placeholder="輸入關(guān)鍵詞..."></input>
placeholder只是占位符,當(dāng)輸入內(nèi)容的時(shí)候就會(huì)自動(dòng)消失,如果沒有內(nèi)容就會(huì)顯示。
<input id="username" type="text" placeholder="在這里輸入內(nèi)容" >
舉報(bào)
HTML(5)+CSS(3)基礎(chǔ)教程8小時(shí)帶領(lǐng)大家步步深入學(xué)習(xí)標(biāo)簽用法和意義
2 回答文本框內(nèi)默認(rèn)值
3 回答文本框如何設(shè)置可以輸入無限內(nèi)容
3 回答文本框里的默認(rèn)內(nèi)容“在這里輸入內(nèi)容...”能不能設(shè)置成,被選擇就會(huì)自動(dòng)刪除的?
3 回答關(guān)于該內(nèi)容中文本 顏色 的變化
3 回答width是內(nèi)容寬度還是邊框以內(nèi)的寬度
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2017-01-20
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>文本域</title>
</head>
<body>
<form action="save.php" method="post" >
? ? <label>個(gè)人簡介:</label>
? ? <textarea style="font-size:20px" cols="50" rows="10" ?placeholder="在這里輸入內(nèi)容" ></textarea>
? ? <input type="submit" value="確定" ?name="submit" ?placeholder="在這里輸入內(nèi)容" />
? ? <input type="reset" value="重置" ?name="reset" />
</form>?
</body>
</html>
對嗎。。
2016-06-20
設(shè)置input的placeholder,例如<input type="text" name="ssk" placeholder="輸入關(guān)鍵詞..."></input>
2016-06-20
placeholder只是占位符,當(dāng)輸入內(nèi)容的時(shí)候就會(huì)自動(dòng)消失,如果沒有內(nèi)容就會(huì)顯示。
2016-06-20
<input id="username" type="text" placeholder="在這里輸入內(nèi)容" >