• 百度搜索,带智能提示


    <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>
  • 相关阅读:
    【生活】我以为的周末 vs 实际上的周末
    【JS】553- 深入理解之undefined与null
    【React】552- React 中必会的 10 个概念
    【性能】551- 前端性能优化之重排和重绘
    【学习】复工至今,自我小结。你也是这样吗?
    【JS】550- 简单几步让你的 JS 写得更漂亮
    【数据结构】549- 8种常见数据结构(JS实现)
    ios 设计软件
    学习网站
    推送客户端学习网址
  • 原文地址:https://www.cnblogs.com/linmilove/p/1512402.html
Copyright © 2020-2023  润新知