我正在将网站搜索移至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