google搜索代码

<html>
<title></title>
<head>

</script>
<script language="JavaScript">
function SearchGoogle(key,evt,site)
  {
   if(evt.keyCode==13 || evt.keyCode==0)
   {
    key.focus();
    var keystr = encodeURIComponent(key.value);
    //url ="http://www.google.com/custom?domains="+site+"&q=";
    //url +=

keystr+"&sitesearch="+site+"&client=pub-4210569241504288&forid=1&ie=UTF-8&oe=GB2312&cof=GALT%3A%23008000%3BGL%3A1%3BDIV%3A%23

EEEEFF%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3AEEEEFF%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000%3BGFNT%3A0000FF%

3BGIMP%3A0000FF%3BLH%3A28%3BLW%3A100%3BL%3Ahttp%3A%2F%2Fwww.cnblogs.com%2Fimages%2Fsearchlogo.gif%3BS%3Ahttp%3A%2F%2Fwww.cnbl

ogs.com%3BLP%3A1%3BFORID%3A1%3B&hl=zh-CN";
    url = "http://www.google.com/search?q=";
    url = url+keystr;
    window.location=url;
    return false;
   }
  }
</script>
</head>
<body>
<form>

<br>
<table border=0 widtn=400>
<tr>
<td>
<input style="WIDTH: 130px" type="text" name="q" id="q" onkeydown="return

SearchGoogle(document.getElementById('q'),event,'http://sutengcn.cnblogs.com/')">&nbsp;<input

onclick="SearchGoogle(document.getElementById('q'),event,'http://sutengcn.cnblogs.com/')" type="button" value="搜索"

name="sa">

</td>
</tr>

</table>
</form>
</html>

posted on 2005-12-08 11:42  农民  阅读(552)  评论(0编辑  收藏  举报

导航