资源天下
文章搜索: 关键字
您的位置:首页网络营销广告联盟 → js文件调用阿里联盟广告或者google广告的代码
js文件调用阿里联盟广告或者google广告的代码
日期:2006-7-1 13:47:02    字体:

用js文件调用阿里联盟广告或者google广告的代码

用js调用阿里联盟广告的js代码:例如:

js文件代码:

document.write("<script>")
document.write("var YahooCNADConfig=new Array();")
document.write("YahooCNADConfig['adid']=xxx;")
document.write("YahooCNADConfig['wid']=xxxx;")
document.write("YahooCNADConfig['w']=xxx;")
document.write("YahooCNADConfig['h']=xxx;")
document.write("</script>")
document.write("<script type='text/javascript' src='http://view.aliunion.cn.yahoo.com/showad.php'></script>")


用js调用google广告的js代码:例如:


document.writeln("<script type='text/javascript'><!--");
document.writeln("google_ad_client = '这里是你的帐号';");
document.writeln("google_ad_width = 120;");
document.writeln("google_ad_height = 240;");
document.writeln("google_ad_format = '120x240_as';");
document.writeln("google_ad_type = 'text_image';");
document.writeln("google_ad_channel ='';");
document.writeln("google_color_border = 'ffffff';");
document.writeln("google_color_bg = 'FFFFFF';");
document.writeln("google_color_link = '0000cc';");
document.writeln("google_color_url = '008000';");
document.writeln("google_color_text = '000000';");
document.writeln("//--></script>");
document.writeln("<script type='text/javascript'");
document.writeln("  src='http://pagead2.googlesyndication.com/pagead/show_ads.js'>");
document.writeln("</script>");

document.write("<script type=\"text/javascript\"><!--");
document.write("google_ad_client = \"pub-48243836529xxxxx\";");
document.write("google_alternate_ad_url = \"http://www.xxxxx.com/index.htm\";");
document.write("google_ad_width = 468;");
document.write("google_ad_height = 60;");
document.write("google_ad_format = \"468x60_as\";");
document.write("google_ad_type = \"text\";");
document.write("google_ad_channel =\"28531xxxxx\";");
document.write("google_color_border = \"CCCCCC\";");
document.write("google_color_bg = \"FFFFFF\";");
document.write("google_color_link = \"000000\";");
document.write("google_color_url = \"666666\";");
document.write("google_color_text = \"333333\";");
document.write("//--></script>");
document.write("<script type=\"text/javascript\"");
document.write("  src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">");
document.write("</script>");

以上只是例子,实际使用时请将相关参数(比如用户id,广告id)改一下。

文章来源:资源天下 作者:web
本站内容大部分来自网络,仅供参考。本站不保证其内容的正确,完整性。评论内容只代表网友个人观点,与本站立场无关。
评论人 评论内容摘要(共 0 条,查看完整内容) 得分 0 发表时间
 热点文章
·大学就业最差的16个专业(网友评论)
·2008年湖北高考录取分数线
·2008年全国各地高考志愿填报政策
·2008年各地高考成绩查分方式及公布时间
·什么是手足口病?
·2008年上海高考满分作文:他们
·高考填报志愿需要注意的几个地方
·万圣节短信精选
 推荐文章
·2008年福建高考满分作文(三篇)
·win2003下不能登陆易方虚拟主机控制面板的解决方..
·2008年湖北省高考作文:举手投足之间(4篇)
·2008年上海高考满分作文:他们
·将网站变为灰黑色的css滤镜代码(全国哀悼日用)
·小儿膝关节响是怎么回事?
·电脑出不来声音,右下角声音图标不见了,该怎么办?..
·ie 浏览器不能打开.shtml网页的一种解决办法
Copyright© 2005-2007 Web.CF66.Net, 鄂ICP备05001705号 Powered By 资源天下