您的位置:首页 > 编程语言 > Go语言

调用外部的搜索引擎(百度和Google)

2015-11-22 10:31 881 查看
调用的百度和Google的代码如下:

<form method=get action="http://www.google.com/search" target="_blank">
<input type=text name=q size=40 maxlength=255 >
<input type=submit name=btnG value="谷歌搜索">
</form>

<form action="http://www.baidu.com/baidu" target="_blank">
<input type=text name=word size=40>
<input type="submit" value="百度搜索">
</form>
注:

     1.调用Google,只是注意method=get 和action="http://www.google.com/search" ,input 文本框的name必须为q,否则提交会失败,返回google搜索首页

     2.注意输入搜索关键字的文本框name为word,如果是其他的返回百度搜索首页。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息