这段代码啥意思?好像是wc写的

[复制链接]
查看: 521   回复: 1
发表于 2005-6-5 22:25:02 | 显示全部楼层 |阅读模式
ch_ad_url = '';
ch_oeh = window.onerror;

function dq(s) { return (s != null) ? '"' + s + '"' : '""'; }
function ch_au(p,v) { if (v) { window.ch_ad_url += '&' + p + '=' + v; } }
function ch_aue(p,v) { if (v) { ch_au(p,escape(v)); } }

function ch_sa() {
  var w = window;
  w.onerror = w.ch_oeh;
  w.ch_ad_url = 'http://ads.chitika.net/showads?client=' + w.ch_client;
  ch_aue('accountid', w.ch_accountid);
  ch_aue('partner', w.ch_partner);
  ch_au('provider', w.ch_provider);
  ch_au('w', w.ch_width);
  ch_au('h', w.ch_height);
  ch_aue('query', w.ch_query);
  ch_aue('url', w.ch_pu);
  ch_aue('ref', document.referrer);
  ch_aue('loc', w.ch_loc);
  ch_aue('cttarget', w.ch_target);
  ch_aue('att', w.ch_att);
  ch_aue('scheme', w.ch_color_scheme);
  ch_aue('cl_border', w.ch_color_border);
  ch_aue('cl_attrib', w.ch_color_attrib);
  ch_aue('cl_bg', w.ch_color_bg);
  ch_aue('cl_title', w.ch_color_title);
  ch_aue('cl_text', w.ch_color_text);
  ch_aue('cl_domain', w.ch_color_domain);
  var r = Math.round(Math.random() * 1000);
  ch_au('cb', r);
  w.ch_ad_url = w.ch_ad_url.substring(0, 1000);
  w.ch_ad_url = w.ch_ad_url.replace(/%\w?$/, '');

  document.write('<ifr' + 'ame' + ' name="ch_ad'+r+'"' + ' width=' + dq(w.ch_width) + ' height=' + dq(w.ch_height) + ' frameborder="0"' + ' src=' + dq(w.ch_ad_url) + ' marginwidth="0"' + ' marginheight="0"' + ' vspace="0"' + ' hspace="0"' + ' allowtransparency="true"' + ' scrolling="no">' + '</ifr' + 'ame>');
  w.ch_pu = null;
  w.ch_loc = null;
}

function ch_eh(m,u,l) {
  ch_sa();
  return true;
}

window.onerror = ch_eh;

if (window.ch_pu == null) {
  ch_pu = document.referrer;
  if (window.top.location == undefined || window.top.location == document.location) {
    ch_pu = document.location;
  }
} else {
  ch_loc = document.referrer;
  if (window.top.location == undefined || window.top.location == document.location) {
    ch_loc = document.location;
  }
}

ch_sa();
发表于 2005-6-6 08:06:51 | 显示全部楼层
他好像不会这个
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则