html顏色代碼 html中input文本框,初始里邊有文字提示,當(dāng)點(diǎn)擊時(shí),文字消失,怎么設(shè)置?
html中input文本框,初始里邊有文字提示,當(dāng)點(diǎn)擊時(shí),文字消失,怎么設(shè)置?使用onfocus事件檢查當(dāng)前值。如果是默認(rèn)值,請(qǐng)將“值”屬性留空。例如:<inputtype=“text”value
html中input文本框,初始里邊有文字提示,當(dāng)點(diǎn)擊時(shí),文字消失,怎么設(shè)置?
使用onfocus事件檢查當(dāng)前值。如果是默認(rèn)值,請(qǐng)將“值”屬性留空。例如:<inputtype=“text”value=“please input content”onfocus=“J腳本:如果( this.value==“請(qǐng)輸入內(nèi)容”)此.value=“”“>