外部引入百度等搜索引擎

注:#

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 @   二柒的博客  阅读(170)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 一起来玩mcp_server_sqlite,让AI帮你做增删改查!!
· 零经验选手,Compose 一天开发一款小游戏!
点击右上角即可分享
微信分享提示
more_horiz
keyboard_arrow_up light_mode palette
选择主题
menu