Loading

外部引入百度等搜索引擎

注:

1.调用Google,只是注意method=get 和action="http://www.google.com/search" ,当然更有一个重点要特别强调,那就是input 文本框的name必须为q,否则提交会失败,返回google搜索首页。至于表单的位置,排版,随意即可。

2.注意输入搜索关键字的文本框name为word,不能为其它。


<span style="font-size:18px;"><form method="get" action="http://www.google.com/search" target="_blank">
     <input name="q" size="40" maxlength="255" type="text" /> <input name="btnG" value="谷歌搜索" type="submit" />
</form>
<form action="http://www.baidu.com/baidu" target="_blank">  
    <input name="word" size="40" type="text" /> <input value="百度搜索" type="submit" />  
</form>
</span>

2.


<body>
  <form οnsubmit="return baiduWithHttps(this)" action="http://www.baidu.com/baidu" target="_blank">
    <input id="input_baidu" type="text"  οnfοcus="checkHttps" name="word" size="30"/>
    <input id="botton_baidu" type="submit" value="百度一下"/>
  </form>
</body>

3.


<!DOCTYPE html>
<html>
    <head>
        e79fa5e98193e4b893e5b19e31333365633863<meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <div id="container">
            <form action="http://www.baidu.com/baidu" target="_blank">
                    <input type='text' name='word' size='30'>
                    <input type="submit" value="百度搜索">
            </form>
            <form action="https://www.sogou.com/web" target="_blank">
                    <input type='text' name='query' size='30'>
                    <input type="submit" value="搜狗搜索">
            </form>
        </div>
    </body>
</html>

posted @ 2020-06-16 13:18  二柒的博客  阅读(150)  评论(0编辑  收藏  举报