2012-08-16 25 views
0

我已經閱讀了關於這個使用JS的幾個線程。有沒有一種方法與使用JS來讓onFocus在IE中工作,當用戶登陸on the pageIE onFocus在登陸頁面時不工作

如果您單擊搜索框並再次關閉,則會出現search site...。它可以在所有其他瀏覽器中正常工作。謝謝。

回答

1

值屬性添加到搜索輸入字段

<input value="search site..." class="searchBox" id="q" onfocus="this.value = this.value=='search site...'?'':this.value;" onblur="this.value = this.value==''?'search site...':this.value;" type="text" size="70"/> 
+0

謝謝謝謝! :) – user1590819 2012-08-16 11:12:40