サイト検索をグーグルカスタム検索に移動しています。
テキストの古い入力は次のようになります。
<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'name'を'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に切り替えると、フォーカスのある検索ボックスをクリアできなくなります。私はとても簡単なものが欠けていますか?