JavaScript代码中出现网址时,自动设为注释了,该怎么办?
<SCRIPTLANGUAGE="JavaScript"><!--//morejavascriptfromhttp://www.smallrain.netfunction...
<SCRIPT LANGUAGE="JavaScript">
<!--
//more javascript from http://www.smallrain.net
function initEcAd() {
document.all.AdLayer1.style.posTop = -200;
document.all.AdLayer1.style.visibility = 'visible'
document.all.AdLayer2.style.posTop = -200;
document.all.AdLayer2.style.visibility = 'visible'
MoveLeftLayer('AdLayer1');
MoveRightLayer('AdLayer2');
}
function MoveLeftLayer(layerName) {
var x = 0;
var y = 100;
var diff = (document.body.scrollTop + y - document.all.AdLayer1.style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = parseInt(y)");
eval("document.all." + layerName + ".style.posLeft = x");
setTimeout("MoveLeftLayer('AdLayer1');", 20);
}
function MoveRightLayer(layerName) {
var x = -3;
var y = 100;
var diff = (document.body.scrollTop + y - document.all.AdLayer2.style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = y");
eval("document.all." + layerName + ".style.posRight = x");
setTimeout("MoveRightLayer('AdLayer2');", 20);
}
document.write("<div id=AdLayer1 style='position: absolute;visibility:hidden;z-index:1'><img src=images/left.gif></div>"
+"<div id=AdLayer2 style='position: absolute;visibility:hidden;z-index:1'><img src=images/right.gif></div>");
initEcAd()
//-->
</SCRIPT>
这是个两侧的滚动广告,原先是两张图片
我现在想换成两个FLASH
但把图片标签<img>那些东西换成
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="108" height="550">
<param name="movie" value="images/left_0110.swf">
<param name="quality" value="high">
<embed src="images/left_0110.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="108" height="550"></embed>
</object>
这种的以后
http://www.macromedia.com/go/getflashplayer
这段代码导致//后面都成了注释,所以FLASH无法显示
怎么办啊?
我就是想把上面的
<img src=images/right.gif>
给换成
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="108" height="550">
<param name="movie" value="images/left_0110.swf">
<param name="quality" value="high">
<embed src="images/left_0110.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="108" height="550"></embed>
</object> 展开
<!--
//more javascript from http://www.smallrain.net
function initEcAd() {
document.all.AdLayer1.style.posTop = -200;
document.all.AdLayer1.style.visibility = 'visible'
document.all.AdLayer2.style.posTop = -200;
document.all.AdLayer2.style.visibility = 'visible'
MoveLeftLayer('AdLayer1');
MoveRightLayer('AdLayer2');
}
function MoveLeftLayer(layerName) {
var x = 0;
var y = 100;
var diff = (document.body.scrollTop + y - document.all.AdLayer1.style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = parseInt(y)");
eval("document.all." + layerName + ".style.posLeft = x");
setTimeout("MoveLeftLayer('AdLayer1');", 20);
}
function MoveRightLayer(layerName) {
var x = -3;
var y = 100;
var diff = (document.body.scrollTop + y - document.all.AdLayer2.style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = y");
eval("document.all." + layerName + ".style.posRight = x");
setTimeout("MoveRightLayer('AdLayer2');", 20);
}
document.write("<div id=AdLayer1 style='position: absolute;visibility:hidden;z-index:1'><img src=images/left.gif></div>"
+"<div id=AdLayer2 style='position: absolute;visibility:hidden;z-index:1'><img src=images/right.gif></div>");
initEcAd()
//-->
</SCRIPT>
这是个两侧的滚动广告,原先是两张图片
我现在想换成两个FLASH
但把图片标签<img>那些东西换成
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="108" height="550">
<param name="movie" value="images/left_0110.swf">
<param name="quality" value="high">
<embed src="images/left_0110.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="108" height="550"></embed>
</object>
这种的以后
http://www.macromedia.com/go/getflashplayer
这段代码导致//后面都成了注释,所以FLASH无法显示
怎么办啊?
我就是想把上面的
<img src=images/right.gif>
给换成
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="108" height="550">
<param name="movie" value="images/left_0110.swf">
<param name="quality" value="high">
<embed src="images/left_0110.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="108" height="550"></embed>
</object> 展开
2个回答
展开全部
换成这句就行了
<embed src='images/left_0110.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='108' height='550'></embed>
<embed src='images/left_0110.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='108' height='550'></embed>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
需要转义啊?试试多打个/!JS的转义不确定哈
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询