您的位置:首页 > 运维架构 > 网站架构

怎么样把百度搜索引入自己的网站JS实现(附源代码)

2011-12-19 13:48 585 查看
下载源代码:http://www.sufeinet.com/forum.php?mod=viewthread&tid=375

大家都见过这种效果吧

View Code

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="Scripts/StyleSheet.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="Scripts/JScript2.js" type="text/javascript"></script>
</head>
<body>
<form style="text-align: center" id="form1" runat="server">
<br />  <br />  <br />  <br />  <br />  <br />  <br />
<input style="width:500px;"  url="true" id="Text1" type="text" /><br/>
<input style="width:500px;" id="Text2" type="text" />
<div style="display: none; position: absolute;" id="allSitesBoxHdl" class="classlist"
onmouseover="this.style.display='block'" onmouseout="this.style.display='none'">
<ul id="allSitesBoxContent">
</ul>
</div>
<script type="text/javascript">        Init();</script>
</form>
</body>
</html>


好了我们一起浏览一下效果吧



是不是很拉风啊。

说到这里不仅仅是百度这样,像Soso,Sogou等都可以使用同样的方法来实现。

大家如有兴趣的话可以下载这个例子看看。下载地址:http://www.sufeinet.com/forum.php?mod=viewthread&tid=375

如果感觉不错的话就给小弟推荐一下吧。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: