techsir 登陆 |注册|TS首页
  首页 快活林 猿氏悟语

把Google搜索换成自己的

By: 冰客 发表于 2008-9-21 11:30:33 · 7817次点击   回复:0   
在include/javascript/google.js文件中将下列代码
  1. document.writeln('<script type="text/javascript">');
  2. document.writeln('function validate_google(theform) {');
  3. document.writeln('        if(theform.site.value == 1) {');
  4. document.writeln('                theform.q.value = \'site:' + google_host + ' \' + theform.q.value;');
  5. document.writeln('        }');
  6. document.writeln('}');
  7. document.writeln('function submitFormWithChannel(channelname) {');
  8. document.writeln('        document.gform.channel.value=channelname;');
  9. document.writeln('        document.gform.submit();');
  10. document.writeln('        return;');
  11. document.writeln('}');
  12. document.writeln('</script>');
  13. document.writeln('<form name="gform" id="gform" method="get" action="http://www.google.cn/search?" target="_blank" onSubmit="validate_google(this);">');
  14. document.writeln('<input type="hidden" name="client" value="aff-discuz" />');
  15. document.writeln('<input type="hidden" name="ie" value="' + google_charset + '" />');
  16. document.writeln('<input type="hidden" name="oe" value="UTF-8" />');
  17. document.writeln('<input type="hidden" name="hl" value="' + google_hl + '" />');
  18. document.writeln('<input type="hidden" name="lr" value="' + google_lr + '" />');
  19. document.writeln('<input type="hidden" name="channel" value="search" />');
  20. document.write('<div onclick="javascript:submitFormWithChannel(\'logo\')" style="cursor:pointer;float: left;width:70px;height:23px;background: url(images/common/Google_small.png) !important;background: none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'images/common/Google_small.png\', sizingMethod=\'scale\')"><img src="images/common/none.gif" border="0" alt="Google" /></div>');
  21. document.writeln('  <input type="text" size="10" name="q" id="q" maxlength="255" value=""></input>');
  22. document.writeln('<select name="site">');
  23. document.writeln('<option value="0">网页搜索</option>');
  24. document.writeln('<option value="1">站内搜索</option>');
  25. document.writeln('</select>');
  26. document.writeln(' <button type="submit" name="sa" value="true">搜索</button>');
  27. document.writeln('</form>');
复制代码
将上面的代码里面的aff-discuz替换成自己的GG帐号?
麻烦懂的看看这样行不,行的话不会算作弊吧。。。。。。。
或许还要改哪里?
刚刚加入GG广告,还不太懂:lol
7817次点击
0个回复  |  直到 2008-9-21 11:30:33
添加一条新回复
您需要登录后才可以回帖 登录 | 成为会员 新浪微博登陆

标签云|手机版|科技先生 ( 京ICP备07036130号 Powered by Discuz! X )

GMT+8, 2024-6-26 16:02