在线客服的函数,在谷歌浏览器里出不来,而在360和IE里都能出来,为什么?很迷茫。。。
我在body里面调用了在线客服的函数,可是在谷歌浏览器里出不来,而在360和IE里都能出来,为什么?
代码是:<script event="onload" for="window" language="javascript">
init_Ad_Right();//载入页面后,调用函数init_Ad_Right()
</script>
<script language="javascript">
<!--
function init_Ad_Right()
{
document.all.AdRightLayer.style.posTop = -300; //设置onLoad事件激发以后,广告层相对于固定后的y方向位置
document.all.AdRightLayer.style.visibility = 'visible'; //设置层为可见
MoveRightLayer('AdRightLayer'); //调用函数MoveRightLayer()
}
function MoveRightLayer(layerName)
{
var x = 20; //浮动广告层固定于浏览器的x方向位置
var y = 50;//浮动广告层固定于浏览器的y方向位置
var diff = (document.documentElement.scrollTop + y - document.all.AdRightLayer.style.posTop)*.90;
var y = document.documentElement.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = y");
eval("document.all." + layerName + ".style.posright = x");//移动广告层
setTimeout("MoveRightLayer('AdRightLayer');", 0);//设置20毫秒后再调用函数MoveRightLayer()
}
//-->
</script>
<div id="AdRightLayer" style='position: absolute; width: 119px; height: 200px; z-index: 20; visibility: hidden; right: 12px; top: 600px'>
<div style='width:118px; font-size:10px;'><div style='height:55px; width:118px; background-image:url(images/up_001.gif);'></div><div style='width:118px; background-image:url(images/mid001.gif);'><div style='height:20px; width:101px; margin:9px;line-height:20px; text-align:center; background-image:url(images/list_001.gif)'>Online Consultation</div><div style='line-height:30px; width:118px; text-align:center;'>
<a target="_blank" href="msnim:chat?contact=maggie-suraki@hotmail.com"><img src="http://www.andasen.com/images/msn.gif" alt="Call me!" width="90" height="25" border="0"></a><br>
Consultation one<br>
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=1293967701&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:1293967701:41 &r=0.8000040180616457" alt="Call me!" width="90" height="25"></a><br>Consultation two<br>
<a target="_blank" href="skype:mengsajewel?call" onclick="return skypeCheck();"><img src=http://mystatus.skype.com/smallclassic/maggiezxl224 style="border: none;" alt="Call me!" width="90" height="25"/></a><br />Consultation three<br />
</div></div><div style='height:21px; width:118px; background-image:url(images/bot_001.gif);'></div></div>
</div>
谷歌浏览器报错是:
Uncaught ReferenceError: init_Ad_Right is not defined SULAQI.asp:311
GET http://localhost/images/up_001.gif 404 (Object Not Found) SULAQI.asp:334
GET http://localhost/images/mid001.gif 404 (Object Not Found) SULAQI.asp:334
GET http://localhost/images/list_001.gif 404 (Object Not Found) SULAQI.asp:334
GET http://localhost/images/bot_001.gif 404 (Object Not Found) SULAQI.asp:343
GET http://localhost/upload/vase-008.jpg 404 (Object Not Found) SULAQI.asp:646
GET http://localhost/UploadPic/2009-3/200932411630437.gif 404 (Object Not Found) lunbotupian.asp:51
Uncaught TypeError: Cannot call method 'getElementsByTagName' of null
------解决方案--------------------错误应该是这个:
Uncaught TypeError: Cannot call method 'getElements