Intra-site search code (Baidu, Google, Yahoo, etc)

Source: Internet
Author: User

<! -- Start searching on the Google site -->
<Form method = get action = "http://www.google.com/search">
<Input type = text name = q>
<Input type = submit name = btng value = "Google Search">
<Input type = hidden name = ie value = gb2312>
<Input type = hidden name = OE value = gb2312>
<Input type = hidden name = HL value = ZH-CN>
<Input type = hidden name = domains value = "www.william long.info">
<Input type = hidden name = sitesearch value = "www.william long.info">
</Form>
<! -- Google site search ends -->

<! -- Baidu Site Search Start -->
<Form action = "http://www.baidu.com/baidu">
<Input type = text name = word>
<Input type = "Submit" value = "Baidu search">
<Input name = tn type = hidden value = "BDS">
<Input name = Cl type = hidden value = "3">
<Input name = CT type = hidden value = "2097152">
<Input name = SI type = hidden value = "www.william long.info">
</Form>
<! -- Baidu intra-site search ends -->

<! -- Start searching on the Yahoo site -->
<Form action = "http://www.yahoo.com.cn/search">
<Input type = text name = "p">
<Input type = "Submit" value = "Yahoo Search">
<Input type = hidden name = vs value = "www.william long.info">
</Form>
<! -- Yahoo website search ended -->

The following is the site search code for Google and Baidu's JavaScript version:

<! -- Start searching on the Google site -->
<SCRIPT type = "text/JavaScript">
Function googlesearch (){
VaR WQ = Document. getelementsbyname ("WQ") [0]. value;
Varlink = "http://www.google.com/search? Domains = www.william long.info & sitesearch = www.william long.info & Q = "+ WQ;
Window. Open (Link );}
</SCRIPT>
<Input type = "text" name = "WQ"/> <input type = "Submit" onclick = "javascript: googlesearch ()" value = "Google Search"/>
<! -- Google site search ends -->

<! -- Baidu Site Search Start -->
<Script language = "JavaScript">
Function baidusearch (){
VaR WD = Document. getelementsbyname ("WD") [0]. value;
VaR link = "http://www.baidu.com/s? SI = www.william long.info & CL = 3 & Ct = 2097152 & Tn = baidulocal & word = "+ WD;
Window. Open (Link );}
</SCRIPT>
<Input type = "text" name = "WD"/> <input type = "Submit" onclick = "javascript: baidusearch ()" value = "Baidu search"/>
<! -- Baidu intra-site search ends -->

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.