数据加载中……
给Blog加Google搜索
网上找到一个代码.给公告加入如下代码

<script language="JavaScript">
<!--
document.write("</form><h3>本站站内搜索</h3><FORM method=GET action=\"
http://www.google.com/search\">");
document.write("<INPUT TYPE=hidden name=ie value=utf-8>");
document.write("<INPUT TYPE=hidden name=oe value=utf-8>");
document.write("<INPUT TYPE=hidden name=\"hl\" value=\"zh-CN\">");
document.write("<TABLE  style='font-size:12px'><tr><td>");
document.write("<IMG SRC=\"
http://www.google.com/logos/Logo_25wht.gif\" ");
document.write("border=\"0\" ALT=\"Google\" align=absmiddle> 提供");
document.write("</td></tr>");
document.write("<tr><td>");
document.write("<INPUT TYPE=text name=q size=20 maxlength=255 value=\"\"><br>");
document.write("<INPUT TYPE=submit name=btnG VALUE=\"搜索\">");
document.write("");
document.write("<INPUT TYPE=hidden name=domains value=\"
www.cnitblog.com/lester\"><br>");
document.write("<INPUT TYPE=radio name=sitesearch value=\"\"> 搜索WWW ");
document.write("<INPUT TYPE=radio name=sitesearch value=\"
www.cnitblog.com/lester\" checked> 搜索本站<br>");
document.write("</font>");
document.write("</td></tr></TABLE>");
document.write("</FORM><form method=post id=form2 name=form2 onsubmit=chggo()>");
document.write("<input type=\"hidden\" name=\"__VIEWSTATE\" value=\"\" />");
function chggo(){
document.getElementById("form2").action=document.getElementById("Form1").action
}
//-->
</script>


把里面的www.cnitblog.com/lester替换成你的网址即可

演示见本站

posted on 2006-07-26 16:57 lester 阅读(217) 评论(0)  编辑 收藏 引用 所属分类: Web 2.0

只有注册用户登录后才能发表评论。