我正在將網站搜索移至Google自定義搜索。使用Google自定義搜索清除輸入焦點
舊的輸入文字是這樣的:
<input type="text" value="Search this website..." name="s" id="searchbox" onfocus="if (this.value == 'Search this website...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search this website...';}" />
現在我需要有ATTR「名稱」作爲「Q」,像這樣:
<input type="text" value="Search this website..." name="q" id="searchbox" onfocus="if (this.value == 'Search this website...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search this website...';}" />
奇怪的是,當我將名稱換成q時,我無法清除焦點上的搜索框。我錯過了超級簡單的東西嗎?
這只是產生一個空白輸入框.. – wesbos 2010-05-20 18:12:16
得到一個更好的瀏覽器:) – 2010-05-20 18:18:21
哈哈,我希望全世界會:| – wesbos 2010-05-20 18:31:05