zoukankan      html  css  js  c++  java
  • 百度搜索,带智能提示

    <html>
    <head>
    <meta http-equiv=Content-Type content="text/html;charset=gb2312">
    <title>百度搜索,带智能提示</title>
    <style>
    td,a
    {font-family:arial}
    #kw
    {font:16px Verdana;height:1.78em;padding-top:2px}
    #b
    {height:30px;padding-top:4px}
    #b,#b 0 3px!important;margin:0 0 10px}
    #sb
    {height:2em;width:5.6em}
    #km
    {height:50px}
    #l
    {margin:0 0 5px 15px}
    #l td
    {padding-left:107px}
    p,table
    {width:650px;border:0}
    #l td,#sb,#km
    {font-size:14px}
    #l a,#l b
    {margin-right:1.14em}
    a
    {color:#00c}
    a:active
    {color:#f60}
    #hp
    {position:absolute;margin-left:6px}
    #lg
    {margin:-26px 0-44px}
    lk
    {width:auto;line-height:18px;vertical-align:top}
    form
    {position:relative;z-index:9}
    </style>
    </head>
    <body>
    <form name=f action=http://www.baidu.com/s><input type=text name=wd id=kw size=35 maxlength=100>
    <input type=hidden name=tn value="jqshw_pg"><input type=hidden name=bar value="">
    <input type=submit value=百度一下 id=sb>
    </form>
    </body>

    <script>
     
    var w = document.f.wd;
     
    function s(o)
     {
      
    if (w.value.length > 0
       {
         
    var h = o.href;
         
    var q = encodeURIComponent(w.value);
         
    if (h.indexOf("q="!= -1)
         {
           o.href 
    = h.replace(new RegExp("q=[^&$]*"), "q=" + q)
         }
         
    else
         {
           o.href 
    += "?q=" + q
         }
      }
     };

     (
    function() 
        {
           
    if (new RegExp("q=([^&]+)").test(location.search))
            {
             w.value 
    = decodeURIComponent(RegExp.$1)
            }
        })();

      document.write(
    '<script src=http://www.baidu.com/js/bdsug.js?v=1.1.0.3><\/script>')
      window.onunload 
    = function() {};
    </script>

    <script>
     w.focus()
    </script>
    </html>
  • 相关阅读:
    Java学习笔记(三)——运算符
    [镜像]镜像操作losetup
    [DNS]部署局域网DNS服务器
    [3G/4G]3G/4G模块开发
    [4G]常用AT指令
    [ubuntu]E: The package firmware-upgrade needs to be reinstalled, but I can't find an archive for it.
    [mmc]Linux下MMC/SD/SDIO的识别与操作
    [MMC]Linux MMC/SD/SDIO驱动分析
    [mmc]设备树节点含义
    [uboot]What is MLO file?
  • 原文地址:https://www.cnblogs.com/linmilove/p/1512402.html
Copyright © 2011-2022 走看看