Google search box Add keyword Implementation code _ form effects

Source: Internet
Author: User
Lets you suggest keywords for your users to search for. To note:
Changing the search box code is a violation of Google policy, but this code is independent of the search code, although it does affect the input of the search box.
For example, use your desired search keyword instead of abc,def and GHI in the following code, and when users click on these keywords, they automatically
Appears in the Search box.
Copy Code code as follows:

Change Forms[0] to forms[n] as needed.
<script language= "JavaScript" >
function Setvar (val) {
Document.forms[0].q.value=val;
}
</SCRIPT>
<p>suggested searches
<br>click a highlighted word below, then press the Search button.
<P>
<a href= "Javascript:setvar (' ABC ');" >ABC</A>
<a href= "Javascript:setvar (' DEF ');" >DEF</A>
<a href= "Javascript:setvar (' GHI ');" >GHI</A>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.