js做的图片漂浮ie和firefox不兼容360可以
js做的图片漂浮ie和firefox不兼容360可以,求大神解决!代码如下:<script><!--functioninitEcAd(){document.all.AdL...
js做的图片漂浮ie和firefox不兼容360可以,求大神解决!代码如下:
<script>
<!--
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 = 40;
var y = 30;
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 = y");
eval("document.all." + layerName + ".style.posLeft = x");
setTimeout("MoveLeftLayer('AdLayer1');", 20);
}
function MoveRightLayer(layerName) {
var x = 40;
var y = 30;
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'><a onclick=\"javascript:{document.all.AdLayer1.style.visibility='hidden'}\" href='#'><img src={dede:global.cfg_templeturl /}/default/images/qrcode.png border=0></a><br /><EMBED src='http://www.ly333.com/images/left.swf' quality=high WIDTH=100 HEIGHT=450 TYPE='application/x-shockwave-flash' id=dl></EMBED></div>"
+"<div id=AdLayer2 style='position: absolute;visibility:hidden;z-index:1'><a onclick=\"javascript:{document.all.AdLayer2.style.visibility='hidden'}\" href='#'><img src={dede:global.cfg_templeturl /}/default/images/7.jpg border=0></a><br /><EMBED src='http://www.ly333.com/images/right.swf' quality=high WIDTH=100 HEIGHT=450 TYPE='application/x-shockwave-flash' id=dl></EMBED></div>");
initEcAd()
//-->
</script> 展开
<script>
<!--
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 = 40;
var y = 30;
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 = y");
eval("document.all." + layerName + ".style.posLeft = x");
setTimeout("MoveLeftLayer('AdLayer1');", 20);
}
function MoveRightLayer(layerName) {
var x = 40;
var y = 30;
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'><a onclick=\"javascript:{document.all.AdLayer1.style.visibility='hidden'}\" href='#'><img src={dede:global.cfg_templeturl /}/default/images/qrcode.png border=0></a><br /><EMBED src='http://www.ly333.com/images/left.swf' quality=high WIDTH=100 HEIGHT=450 TYPE='application/x-shockwave-flash' id=dl></EMBED></div>"
+"<div id=AdLayer2 style='position: absolute;visibility:hidden;z-index:1'><a onclick=\"javascript:{document.all.AdLayer2.style.visibility='hidden'}\" href='#'><img src={dede:global.cfg_templeturl /}/default/images/7.jpg border=0></a><br /><EMBED src='http://www.ly333.com/images/right.swf' quality=high WIDTH=100 HEIGHT=450 TYPE='application/x-shockwave-flash' id=dl></EMBED></div>");
initEcAd()
//-->
</script> 展开
2个回答
展开全部
js脚本可以参考W3C标准 http://www.w3schools.com/js/
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询