异步的执行

etnet 2010-01-20 09:26:59
以下是一段openx生成的广告代码,由于含有"document.write"有什么办法异步的执行吗?


document.MAX_ct0 ='{clickurl}';
var m3_u = (location.protocol=='https:'?'https://ad.etnet.com.cn/www/delivery/ajs.php':'http://ad.etnet.com.cn/www/delivery/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) {
document.MAX_used = ',';
}
document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
document.write ("?zoneid=8&charset=UTF-8");
document.write ('&cb=' + m3_r);
if (document.MAX_used != ',') {
document.write ("&exclude=" + document.MAX_used);
}
document.write ('&charset=UTF-8');
document.write ("&loc=" + escape(window.location));
if (document.referrer) {
document.write ("&referer=" + escape(document.referrer));
}
if (document.context) {
document.write ("&context=" + escape(document.context));
}
if ((typeof(document.MAX_ct0) != 'undefined') && (document.MAX_ct0.substring(0,4) == 'http')) {
document.write ("&ct0=" + escape(document.MAX_ct0));
}
if (document.mmm_fo) {
document.write ("&mmm_fo=1");
}
document.write ("'><\/scr"+"ipt>");
...全文
119 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
kksss 2010-01-22
  • 打赏
  • 举报
回复
页面加载完成使用document.write会出现问题

建议动态创建script标签(方法google多的是)
浴火_凤凰 2010-01-22
  • 打赏
  • 举报
回复
不明白
KK3K2005 2010-01-21
  • 打赏
  • 举报
回复
setTimeout
etnet 2010-01-21
  • 打赏
  • 举报
回复
没有人了解吗?

87,997

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧