广告联盟网

标题: 懂些JS的进,关于投放广告代码 [打印本页]

作者: HELLO谷歌    时间: 2007-3-15
标题: 懂些JS的进,关于投放广告代码
我在做淘宝的文字广告,想一个JS调用2个广告

HTML代码如下,我把它保存为 *.htm 显示正常

CODE:
<script>
var YahooCNADConfig=new Array();
YahooCNADConfig["adid"]=144
YahooCNADConfig["wid"]=22560
YahooCNADConfig["w"]=126
YahooCNADConfig["h"]=16
var YahooCustConfig=new Array();
YahooCustConfig["bg_color"]="ffff00";
YahooCustConfig["fr_color"]="0000ff";
YahooCustConfig["hv_color"]="FF0000";
YahooCustConfig["bold"]=0;
</script>
<script type="text/javascript" src="http://view.aliunion.cn.yahoo.com/showad.php"></script>

<script>
var YahooCNADConfig=new Array();
YahooCNADConfig["adid"]=136
YahooCNADConfig["wid"]=22560
YahooCNADConfig["w"]=88
YahooCNADConfig["h"]=16
var YahooCustConfig=new Array();
YahooCustConfig["bg_color"]="ffff00";
YahooCustConfig["fr_color"]="0000ff";
YahooCustConfig["hv_color"]="FF0000";
YahooCustConfig["bold"]=0;
</script>
<script type="text/javascript" src="http://view.aliunion.cn.yahoo.com/showad.php"></script>

然后我用HTML转JS的工具转成JS,调用发现显示的不正常,请教是哪里的问题

CODE:
document.writeln("<script>");
document.writeln("var YahooCNADConfig=new Array();");
document.writeln("YahooCNADConfig[\"adid\"]=144");
document.writeln("YahooCNADConfig[\"wid\"]=22560");
document.writeln("YahooCNADConfig[\"w\"]=126");
document.writeln("YahooCNADConfig[\"h\"]=16");
document.writeln("var YahooCustConfig=new Array();");
document.writeln("YahooCustConfig[\"bg_color\"]=\"ffff00\";");
document.writeln("YahooCustConfig[\"fr_color\"]=\"0000ff\";");
document.writeln("YahooCustConfig[\"hv_color\"]=\"FF0000\";");
document.writeln("YahooCustConfig[\"bold\"]=0;");
document.writeln("<\/script>");
document.writeln("<script type=\"text\/javascript\" src=\"http:\/\/view.aliunion.cn.yahoo.com\/showad.php\"><\/script>");

document.writeln("<script>");
document.writeln("var YahooCNADConfig=new Array();");
document.writeln("YahooCNADConfig[\"adid\"]=136");
document.writeln("YahooCNADConfig[\"wid\"]=22560");
document.writeln("YahooCNADConfig[\"w\"]=88");
document.writeln("YahooCNADConfig[\"h\"]=16");
document.writeln("var YahooCustConfig=new Array();");
document.writeln("YahooCustConfig[\"bg_color\"]=\"ffff00\";");
document.writeln("YahooCustConfig[\"fr_color\"]=\"0000ff\";");
document.writeln("YahooCustConfig[\"hv_color\"]=\"FF0000\";");
document.writeln("YahooCustConfig[\"bold\"]=0;");
document.writeln("<\/script>");
document.writeln("<script type=\"text\/javascript\" src=\"http:\/\/view.aliunion.cn.yahoo.com\/showad.php\"><\/script>")

谢谢!
作者: 老萨    时间: 2007-3-17
不太懂,估计是人家服务器端的问题。




欢迎光临 广告联盟网 (https://bbs.ggads.com/) Powered by Discuz! X3.2