js实现站内搜索

堆代码的爱因斯坦 2010-09-15 04:29:14
<div style="width: 233px; height: 40px; background-color: #d2e4f2">
<div align="center" style="margin-top: 4px">
<table>
<tbody>
<tr>
<td>
<select name="sel"><option selected="selected">标题</option><option>作者</option></select></td>
<td>
<input id="txt" name="wq" size="6" style="width: 100px; height: 17px" width="10" /></td>
<td>
<img alt="" height:="" onclick="javascript:baidusearch()" src="/port/upload/images/search.png" style="cursor: hand" /></td>
</tr>
</tbody>
</table>
</div>
</div>

<script language="javascript">
function baidusearch () {
var wd=document.getElementsByName("wq")[0].value;
var link="http://www.baidu.com/s?si=www.fzlsk.com&cl=3&ct=2097152&tn=baidulocal&word="+wd;
window.open(link); }
</script>

我的这个搜索只是实现要跳到百度,然后点击才到搜索!怎么实现直接在站内的!
...全文
730 17 打赏 收藏 转发到动态 举报
写回复
用AI写文章
17 条回复
切换为时间正序
请发表友善的回复…
发表回复
y244360439 2012-05-10
  • 打赏
  • 举报
回复
这里有个利用jquery实现页面搜索的例子http://www.wodeblog.com/archives/416
liuzhengdong007 2010-09-21
  • 打赏
  • 举报
回复
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
</head>
  • 打赏
  • 举报
回复
  • 打赏
  • 举报
回复
还是没人来!!!!!!!!!!!
hoojo 2010-09-16
  • 打赏
  • 举报
回复
光靠js不能做出搜索的
wwfgu00ing 2010-09-16
  • 打赏
  • 举报
回复
Lucene.net站内搜索
  • 打赏
  • 举报
回复
谁能把我的代码完善下??乱码的问题加那个utf-8是在form里,我这里怎吗加!!
wuyq11 2010-09-15
  • 打赏
  • 举报
回复
Lucene.net站内搜索
sql server全文检索
js通过web servives等获取数据
O爱咋咋地O 2010-09-15
  • 打赏
  • 举报
回复

http://www.baidu.com/search/freecode.html
是这个么 里面有乱码处理
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 gs8716 的回复:]
听说很复杂
[/Quote]
没有高手啊!!!!很急的!!!!!!!!!!!!!!
gs8716 2010-09-15
  • 打赏
  • 举报
回复
听说很复杂
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 battlerxange 的回复:]
可以不经过baidu跳转的我也想知道=v=

我直接访问不是乱码
[/Quote]
我的怎么是乱码啊!
BATTLERxANGE 2010-09-15
  • 打赏
  • 举报
回复
可以不经过baidu跳转的我也想知道=v=

我直接访问不是乱码
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 battlerxange 的回复:]
囧……?你想怎么实现?这种搜索只能这样了,要不用个iframe嵌入到页面中去?
[/Quote]
我想实现的不经过百度跳啊,现在的这个也有问题
是乱码!
BATTLERxANGE 2010-09-15
  • 打赏
  • 举报
回复
囧……?你想怎么实现?这种搜索只能这样了,要不用个iframe嵌入到页面中去?
  • 打赏
  • 举报
回复
很急啊!!!!!!!!!!!
  • 打赏
  • 举报
回复
我顶!!!!!!!!!!!!!!!!!!!!!!!!!!!上面的那个也忽然不能用了!

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

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