• 2007-10-19百度搜索代码 - [代码]

    1.
    <form action="http://www.baidu.com/baidu" target="_blank">
    <table bgcolor="#FFFFFF"><tr><td>
    <input name=tn type=hidden value=baidu>
    <a href="http://www.baidu.com/"><img

    src="http://img.baidu.com/img/logo-80px.gif" alt="Baidu" align="bottom"

    border="0"></a>
    <input type=text name=word size=30>
    <input type="submit" value="百度搜索">
    </td></tr></table>
    </form><br>

    2.
    <SCRIPT language=javascript>
    function gowhere1(formname)
    {
     var url;
     if (formname.myselectvalue.value == "0")
     {
      url = "http://www.baidu.com/baidu";
      document.search_form1.tn.value = "baidu";
      formname.method = "get";
     }
     if (formname.myselectvalue.value == "1")
     {
      url = "http://mp3.baidu.com/m";
      document.search_form1.tn.value = "baidump3";
      document.search_form1.ct.value = "134217728";
      document.search_form1.lm.value = "-1";
     }
     
     if (formname.myselectvalue.value == "4")
     {
      document.search_form1.tn.value = "news";
      document.search_form1.cl.value = "2";
      document.search_form1.rn.value = "20";
      url = "http://news.baidu.com/ns"; 
     }
     if (formname.myselectvalue.value == "5")
     {
      document.search_form1.tn.value = "baiduiamge";
      document.search_form1.ct.value = "201326592";
      document.search_form1.cl.value = "2";
      document.search_form1.lm.value = "-1"; 
      url = "http://image.baidu.com/i"; 
    }
    if (formname.myselectvalue.value == "6")
     {
      url = "http://post.baidu.com/f";
      document.search_form1.tn.value = "baiduPostSearch";
      document.search_form1.ct.value = "352321536";
      document.search_form1.rn.value = "10";
      document.search_form1.lm.value = "65536"; 
     }   
     
      formname.action = url;
     return true;
    }
    </SCRIPT>
    <form name="search_form1" target="_blank" onsubmit="return gowhere1

    (this)">
    <table width="460" height="60" border="0" bgcolor="#FFFFFF"

    cellpadding="0" cellspacing="0" style=font-family:宋体><tr><td>
    <TABLE width="460" height="80" border=0 cellPadding=0 cellSpacing=0>
          <INPUT name=myselectvalue type=hidden value=0>
          <INPUT name=tn type=hidden>
          <INPUT name=ct type=hidden>
          <INPUT name=lm type=hidden>
          <INPUT name=cl type=hidden>
          <INPUT name=rn type=hidden>
          <TR>
                      <TD width="8%" valign="bottom">
                        <DIV align=center><a

    href="http://www.baidu.com/"><img src="http://img.baidu.com/img/logo-

    80px.gif"
    alt="Baidu" align="bottom" border="0"></a></DIV></TD>
        <TD vAlign=bottom width="92%">
    <INPUT name=myselect

    onclick=javascript:this.form.myselectvalue.value=4; type=radio value=0>
                        <FONT color=#0000cc style="FONT-SIZE: 12px">新闻

    </FONT>
                     
                       <INPUT CHECKED name=myselect

    onclick=javascript:this.form.myselectvalue.value=0; type=radio value=0>
                        <SPAN class=f12><FONT color=#0000cc style="FONT-

    SIZE: 12px">网页</FONT></SPAN>
                        <INPUT name=myselect

    onclick=javascript:this.form.myselectvalue.value=1; type=radio value=1>
                        <SPAN class=f12><FONT color=#0000cc style="FONT-

    SIZE: 12px">mp3</FONT></SPAN>
    <INPUT name=myselect

    onclick=javascript:this.form.myselectvalue.value=6; type=radio value=0>


    <FONT color=#0000cc style="FONT-SIZE: 12px">贴吧</FONT>
    <INPUT name=myselect

    onclick=javascript:this.form.myselectvalue.value=5; type=radio value=0>
                        <FONT color=#0000cc style="FONT-SIZE: 12px">图片

    </FONT>
          
                        <TABLE align=right border=0 cellPadding=0

    cellSpacing=0 width="100%">
                          <TBODY>
                            <TR>
                              <TD><FONT style="FONT-SIZE: 12px">
                                <input id=word name=word size="40">
                                </FONT> <input type="submit" value="百度搜

    索"> </TD></TR>                   
                       
           </form><br>

    3.
    <SCRIPT language=javascript>
    function g(formname) {
    var url = "http://www.baidu.com/baidu";
    if (formname.s[1].checked) {
     formname.ct.value = "2097152";
    }
    else {
     formname.ct.value = "0";
    }
    formname.action = url;
    return true;
    }
    </SCRIPT>
    <form name="f1" onsubmit="return g(this)">
    <table bgcolor="#FFFFFF" style="font-size:9pt;">
    <tr height="60"><td valign="top"><img

    src="http://img.baidu.com/img/logo-137px.gif" border="0"

    alt="baidu"></td>
    <td>
    <input name=word size="30" maxlength="100">
    <input type="submit" value="百度搜索"><br>
    <input name=tn type=hidden value="bds">
    <input name=cl type=hidden value="3">
    <input name=ct type=hidden>
    <input name=si type=hidden value="zzymale.blogbus.com">
    <input name=s type=radio> 互联网
    <input name=s type=radio checked> zzymale.blogbus.com
    </td></tr></table>
    </form><br>

    注意:将zzymale.blogbus.com换为自己的域名即可实现对自己网站的搜索。

  • 不隐藏转向之后的地址 代码一
    ------------------------------------------------------------------------------
    <html>
    <head>
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
    <title></title>
    </head>
    <body>
    <form name=loading>
    <P align=center><FONT face=Arial color=#0066ff size=2>loading...</FONT> <INPUT
    style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: bolder; PADDING-BOTTOM: 0px; COLOR: #0066ff; BORDER-TOP-style: none; PADDING-TOP: 0px; FONT-FAMILY: Arial; BORDER-RIGHT-style: none; BORDER-LEFT-style: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-style: none"
    size=46 name=chart> <BR><INPUT
    style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; COLOR: #0066ff; BORDER-BOTTOM: medium none; TEXT-ALIGN: center"
    size=47 name=percent>
    <SCRIPT>
    var bar=0
    var line="||"
    var amount="||"
    count()
    function count(){
    bar=bar 2
    amount =amount line
    document.loading.chart.value=amount
    document.loading.percent.value=bar "%"
    if (bar<99)
    {setTimeout("count()",100);}
    else
    {window.location = "将这里改成要转入的网址";}
    }</SCRIPT>
    </P></form>
    </body>
    </html>
    -------------------------------------------------------------------------------

    不隐藏转向之后的地址 代码二
    -------------------------------------------------------------------------------
    <html>
    <body>
    <script language="javascript">
    <!--
    function goToURL() { //v2.0
    for (var i=0; i< (goToURL.arguments.length - 1); i =2) //with arg pairs
    eval(goToURL.arguments ".location='" goToURL.arguments[i 1] "'");
    document.returnvalue = false;
    }
    //-->
    </script>
    <body bgcolor="#FFFFFF" onLoad="goToURL('parent','将这里改成要转入的网址');return document.returnvalue">
    </body>
    </html>
    -
    ------------------------------------------------------------------------------

    不隐藏转向之后的地址 代码三
    -------------------------------------------------------------------------------
    <html>
    <head>
    <meta http-equiv="Content-Language" content="zh-CN">
    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
    <title></title>
    </head>
    <SCRIPT LANGUAGE="javascript">
    <!-- Start Code
    var ver = navigator.appVersion;
    if (ver.indexOf("MSIE") != -1)
    {
    window.location.href="将这里改成要转入的网址"
    }else
    window.location.href="将这里改成要转入的网址"
    // End Code -->
    </SCRIPT>
    </html>
    -------------------------------------------------------------------------------

    不隐藏转向之后的地址 代码四
    -------------------------------------------------------------------------------
    <html>
    <head>
    <meta http-equiv="Content-Language" content="zh-CN">
    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
    <title></title>
    </head>
    <body>
    <meta http-equiv="refresh" content="0.1;url=将这里改成要转入的网址">
    </body>
    </html>
    -------------------------------------------------------------------------------

    可隐藏转向之后的地址
    -------------------------------------------------------------------------------
    <html>
    <head>
    <meta http-equiv="Content-Language" content="zh-CN">
    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
    <title></title>
    </head>
    <frameset framespacing="0" border="0" rows="0" frameborder="0">
    <frame name="main" src="将这里改成要转入的网址" scrolling="auto" noresize>
    </frameset>
    </html>
    透明Flash的设置

    主要是在Flash代码段中插入这一语句:<param name=wmode value=transparent>,请看以下实例:

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%">
    <param name="movie" value="../images/hudie.swf">
    <param name="quality" value="high">
    <param name=wmode value=transparent> <!--这个代码表示背景透明--!>
    <embed src="../images/hudie.swf" width="100%" height="100%" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
    </object>

    -------------------------------------------------------------------------------

    asp程序代码
    -------------------------------------------------------------------------------
    <%if Request.ServerVariables("SERVER_NAME")="cdpy.com" then
    response.redirect "default.asp"
    else%>
    <%end if%>
    <%if Request.ServerVariables("SERVER_NAME")="www.cdpy.com" then
    response.redirect "default.asp"
    else%>
    <%end if%>
    <%if Request.ServerVariables("SERVER_NAME")="xingqiba.com" then
    response.redirect "cdhome/default.asp"
    else%>
    <%end if%>
    <%if Request.ServerVariables("SERVER_NAME")="www.xingqiba.com" then
    response.redirect "cdhome/default.asp"
    else%>
    <%end if%>
    <%if Request.ServerVariables("SERVER_NAME")="blog.xingqiba.com" then
    response.redirect "blog/"
    else%>

    -------------------------------------------------------------------------------

    Javascript程序代码
    -------------------------------------------------------------------------------
    <html>
    <head>
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>正在进入</title>
    </head>
    <body>
    <form name=loading>
     <p align=center> <font color="#0066ff" size="2">正在进入,请稍等</font><font color="#0066ff" size="2" face="Arial">...</font>
      <input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:#0066ff; background-color:#fef4d9; padding:0px; border-style:none;">
      
      <input type=text name=percent size=47 style="color:#0066ff; text-align:center; border-width:medium; border-style:none;">
      <script> 
    var bar=0 
    var line="||" 
    var amount="||" 
    count() 
    function count(){ 
    bar=bar+2 
    amount =amount + line 
    document.loading.chart.value=amount 
    document.loading.percent.value=bar+"%" 
    if (bar<99) 
    {setTimeout("count()",100);} 
    else 
    {window.location = "http://chaoy.spaces.live.com/";} 
    }</script>
     </p>
    </form>
    <p align="center"> 如果您的浏览器不支持跳转,<a style="text-decoration: none" href="http://chaoy.spaces.live.com/"><font color="#FF0000">请点这里</font></a>.</p>
    </body>
    </html>

  • 多搜索引擎代码 

    想拥有百度 GOOGLE YAHOO 搜狗等多个搜索引擎吗?想拥有MP3 博客文档翻译字典新闻等一系列搜索服务吗?你只需要将以下代码放入<body> </body>中即可。

    <P align=center><SELECT
    onkeypress="if (window.event.keyCode==13){ysss_do.click();}"
    style="WIDTH: 80px; HEIGHT: 29px" size=1
    <OPTION
      value=http://www.baidu.com/baidu?word= selected>百 度</OPTION>
    <OPTION
      value=http://www.google.com/search?hl=zh-CN&ie=GB2312&q=>Google</OPTION>
    <OPTION
      value=http://www.sogou.com/web?query=>搜狗</OPTION>
    <OPTION value=http://www.yisou.com/search?p=>雅虎</OPTION>
    <OPTION value=http://so.xunlei.com/search?search=>迅雷</OPTION>
    <OPTION
      value=http://www.yodao.com/search?ue=utf8&keyfrom=web.index&q=
     >有 道</OPTION>

    <OPTION
      value=http://iask.com/s?k=>爱问</OPTION>
    <OPTION
      value=http://p.zhongsou.com/p?pt=1&k=&jc=&aid=E0700000000&rt=o&w=
     >中 搜</OPTION>
    <OPTION
      value=http://search.msn.com.cn/results.aspx?FORM=MSNH&srch_type=0&q=
     >MSN</OPTION>
    <OPTION
      value=http://blog.iask.com/b?t=keyword&q=>博客</OPTION>
    <OPTION
      value=http://news.baidu.com/ns?cl=2&rn=20&tn=news&word=
     >新 闻</OPTION>
    <OPTION
      value=http://weather.tq121.com.cn/detail.php?city=>天气</OPTION>
    <OPTION value=http://mp3.baidu.com/m?f=ms&rn=&tn=baidump3&ct=134217728&lm=-1&word=
     >音 乐</OPTION>
    <OPTION
      value=http://images.google.com/images?ie=GB2312&hl=zh-CN&q=>图片</OPTION>
    <OPTION
      value=http://ys.cn.yahoo.com/mohu/index.html?bt1=all&bt2=all&source=ys_result_topsearch&t=2&p=
     >影 视</OPTION>
    <OPTION
      value=http://video.cn.yahoo.com/search.html?p=>视频</OPTION>
    <OPTION
      value=http://map.sogou.com/new/#lq=>地图</OPTION>
    <OPTION
      value=http://www.baidu.com/s?tn=baiduadv&ft=all&q1=
     >文 档</OPTION>
    <OPTION
      value=http://cb.kingsoft.com/search?t=word&lang=gb2312&s=>词霸</OPTION>
    <OPTION
      value=http://www.baidu.com/baidu?ie=gb2312&bs=&sr=&z=&ct=1048576&submit=%D3%A2%BA%BA%B4%CA%B5%E4&cl2=3&f=8&word=
     >英语词典</OPTION>
    <OPTION
      value=http://ishare.sina.com.cn/search.php?key=>共享资料</OPTION>
    <OPTION
      value=http://scholar.google.com/scholar?q=>学术搜索</OPTION>
    <OPTION
      value=http://law.baidu.com/s?tn=baidulaw&cl=0&ct=2097152&si=law.baidu.com&word=
     >法律搜索</OPTION>
    <OPTION
      value=http://www.baidu.com/s?tn=baidugov&wd=
     >政府网站</OPTION>

    <OPTION
      value=http://www.baidu.com/s?tn=baidujiaoyu&wd=
     >教育网站</OPTION>

    <OPTION
      value=http://bbs.zhongsou.com/b?w=>论坛搜索</OPTION>
    <OPTION
      value=http://www.baidu.com/s?tn=baiduchild&cl=3&wd=
     >少儿搜索</OPTION>

    <OPTION
      value=http://www.cndbk.com.cn/s?s=a&q=>百科搜索</OPTION>

    </SELECT> <INPUT
    onkeypress="if (window.event.keyCode==13){ysss_do.click();}"
    size=47><IMG title=搜索关健词 style="CURSOR: hand"
    onclick=window.open(ysss_yq.value+ysss_word.value); height=35
    src="img/sou.gif" width=37></B> </P>