鏈接示例如下:http://jsfiddle.net/fxr5p/如何使值爲空,onload工作onblur
函數?顯示type your keyword
,然後點擊輸入部分,onblur
單詞disapear?謝謝。js輸入onBlur在頁面載入時不工作
<input type="text" value="" id="search" name="Search" onblur="if(this.value=='') this.value='type your keyword';" onfocus="if(this.value=='type your keyword') this.value='';">