新窗口打开,显示搜索结果

cylgwyb 2010-09-06 09:02:28
代码如下


<form action="search.php" method="get" id="search_web" name="search_web">
<input class="s_input" type="text" value="请输入你要搜索的内容" name="want" onmouseover="this.focus()" onfocus="this.select()" >
<input type="submit" class="s_btn" id="sbtn" value="搜网页">
<p>
<input type="radio" name="engine" value="baidu" checked>百度
<input type="radio" name="engine" value="google" >谷歌
<input type="radio" name="engine" value="soso" >搜搜
<input type="radio" name="engine" value="sogou" >搜狗
<input type="radio" name="engine" value="bing" >必应
<input type="radio" name="engine" value="yodao" >有道
<input type="radio" name="engine" value="zhongsou" >中搜
<input type="radio" name="engine" value="googleen" >Google
</p>
<input type=hidden>
</form>



想实现点击后在新窗口打开搜索结果。
...全文
114 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
ciray 2010-09-09
  • 打赏
  • 举报
回复
要改善用户体验,就得用ajax来实现,不要用form,ajax直接post或get数据到php
然后接收php返回的数据,以不刷新当前页面的方式展现(即在当前页面上弹出一个浮动的层div)。

关于弹层的实现方法,jquery提供了很多开源的插件,楼主可以参考一下
http://trentrichardson.com/Impromptu/index.php
cylgwyb 2010-09-09
  • 打赏
  • 举报
回复
期待更好的答案
xujian2009 2010-09-07
  • 打赏
  • 举报
回复
在form中添加target='_blank'
stoneJU 2010-09-07
  • 打赏
  • 举报
回复
在form中添加target='_blank'
heyli 2010-09-07
  • 打赏
  • 举报
回复

<form action="http://www.baidu.com/baidu" target="_blank">
<table bgcolor="#FFFFFF"><tr><td>
<input name=tn type=hidden value=baidu>
<a href="http://www.baidu.com/"><img src="http://img.baidu.com/img/logo-80px.gif" alt="Baidu" align="bottom" border="0"></a>
<input type=text name=word size=30>
<input type="submit" value="百度搜索">
</td></tr></table>
</form>



<form method="get" action="http://www.google.com.hk/search" target="google_window">
<table bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<label for="sbi" style="display: none">输入您的搜索字词</label>
<input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">提交搜索表单</label>
<input type="submit" name="sa" value="Google 搜索" id="sbb"></input>
<input type="hidden" name="ie" value="GB2312"></input>
<input type="hidden" name="oe" value="GB2312"></input>
<input type="hidden" name="hl" value="zh-CN"></input>
</td></tr></table>
</form>
</center>


你用这两段代码提交下 看下他们的url你就明白了
其它的搜索你就自己找下
CunningBoy 2010-09-07
  • 打赏
  • 举报
回复
searche.php中的代码,你应该去各个搜索引擎提供的接口说明
cylgwyb 2010-09-06
  • 打赏
  • 举报
回复
有没有search.php的代码
amani11 2010-09-06
  • 打赏
  • 举报
回复
<form action="search.php" method="get" id="search_web" name="search_web" target="_blank">

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧