请大看下,怎么回事的,在ie上正常显示的,能隐藏菜单当鼠标指到时就能显示出来的,但是在火狐上一直显示出来的。也不会隐藏菜单。请高手帮帮忙下。
document.writeln("<!-- 左隐藏菜单开始 -->");
document.writeln("<SCRIPT language=JavaScript1.2>");
document.writeln("");
document.writeln("function move(x, y) {");
document.writeln("if (document.all) {");
document.writeln("object1.style.pixelLeft += x;");
document.writeln("object1.style.pixelTop  += y;}");
document.writeln("else");
document.writeln("if (document.layers) {");
document.writeln("document.object1.left += x;");
document.writeln("document.object1.top  += y;");
document.writeln("}};");
document.writeln("");
document.writeln("function position() {");
document.writeln("document.object1.left += -200;");
document.writeln("document.object1.top  += 0;");
document.writeln("document.object1.visibility = \"show\"");
document.writeln("};");
document.writeln("");
document.writeln("function makeStatic() {");
document.writeln("if (document.all) {object1.style.pixelTop=document.body.scrollTop+115}");
document.writeln("else {eval(\'document.object1.top=eval(window.pageYOffset+20)\');}");
document.writeln("setTimeout(\"makeStatic()\",0);}");
document.writeln("");
document.writeln("<\/SCRIPT>");
document.writeln("<!-- 左隐藏菜单结束 --><!-- 左隐藏菜单BIG --><LAYER class=NS onmouseover=move(580,0) onmouseout=\"move(-580, 0)\" name=\"object1\" visibility=\"hide\" top=\"20\" left=\"0\">");
document.writeln("<SCRIPT language=JavaScript1.2>");
document.writeln("if (document.all)");
document.writeln("document.write(\'<DIV ID=\"object1\" style=\"Position : Absolute ;Left : -125px ;Top : 20px ;Width : 0px ;Z-Index : 20\">\')");
document.writeln("<\/SCRIPT>");
document.writeln("");
document.writeln("<TABLE onmouseover=move(120,0) onmouseout=\"move(-120, 0)\" cellSpacing=3 cellPadding=0 border=0>");
document.writeln("");
document.writeln("<TR>");
document.writeln("<TD style=\"BORDER-RIGHT: #aadcea 1px solid; BORDER-TOP: #aadcea 1px solid; BORDER-LEFT: #aadcea 1px solid; BORDER-BOTTOM: #aadcea 1px solid\" bgColor=#daf0f3>");
document.writeln("<TABLE cellSpacing=5 cellPadding=4 width=118 border=0>");
document.writeln("");
document.writeln("<TR>");
document.writeln("<TD align=middle bgColor=#f9fcfd height=30>");
document.writeln("<TABLE cellSpacing=5 cellPadding=0 width=\"100%\" border=0>");
document.writeln("");
document.writeln("<TR>");
document.writeln("<TD><a target=blank href=tencent:\/\/message\/?uin=421752260&Site=创立互联建站咨询&Menu=yes><img border=\"0\" SRC=http:\/\/wpa.qq.com\/pa?p=1:421752260:4 alt=\"点击这里给我发消息\"> <strong>建站客服1<\/strong><\/a><\/TD>");
document.writeln("<\/TR>");
document.writeln("<TR>");
document.writeln("<TD bgcolor=\"#FFFFFF\"><a target=blank href=tencent:\/\/message\/?uin=793618321&Site=创立互联建站咨询&Menu=yes><img border=\"0\" SRC=http:\/\/wpa.qq.com\/pa?p=1:793618321:4 alt=\"点击这里给我发消息\"> <strong>建站客服2<\/strong><\/a><\/TD>");
document.writeln("<\/TR>");
document.writeln("<TR>");
document.writeln("<TD bgcolor=\"#FFFFFF\"><a target=blank href=tencent:\/\/message\/?uin=727145806&Site=创立互联建站咨询&Menu=yes><img border=\"0\" SRC=http:\/\/wpa.qq.com\/pa?p=1:727145806:4 alt=\"点击这里给我发消息\"> <strong>建站客服3<\/strong><\/a><\/TD>");
document.writeln("<\/TR>");
document.writeln("<TR>");
document.writeln("<TD><a target=blank href=tencent:\/\/message\/?uin=164778846&Site=创立互联建站咨询&Menu=yes><img border=\"0\" SRC=http:\/\/wpa.qq.com\/pa?p=1:164778846:4 alt=\"点击这里给我发消息\"> <strong>建站客服4<\/strong><\/a><\/TD>");
document.writeln("<\/TR>");
document.writeln("<TR>");
document.writeln("<TD><a target=blank href=tencent:\/\/message\/?uin=674506037&Site=创立互联建站咨询&Menu=yes><img border=\"0\" SRC=http:\/\/wpa.qq.com\/pa?p=1:674506037:4 alt=\"点击这里给我发消息\"> <strong>建站客服5<\/strong><\/a><\/TD>");
document.writeln("<\/TR>");
document.writeln("<TR>");
document.writeln("<TD><a target=blank href=tencent:\/\/message\/?uin=441537594&Site=创立互联建站咨询&Menu=yes><img border=\"0\" SRC=http:\/\/wpa.qq.com\/pa?p=1:441537594:4 alt=\"点击这里给我发消息\"> <strong>建站客服6<\/strong><\/a><\/TD>");
document.writeln("<\/TR>");
document.writeln("<TR>");
document.writeln("<TD><a target=blank href=tencent:\/\/message\/?uin=954709016&Site=创立互联建站咨询&Menu=yes><img border=\"0\" SRC=http:\/\/wpa.qq.com\/pa?p=1:954709016:4 alt=\"点击这里给我发消息\"> <strong>建站客服7<\/strong><\/a><\/TD>");
document.writeln("<\/TR>");
document.writeln("<TR>");
document.writeln("<TD><a target=blank href=tencent:\/\/message\/?uin=75636522&Site=创立互联建站咨询&Menu=yes><img border=\"0\" SRC=http:\/\/wpa.qq.com\/pa?p=1:75636522:4 alt=\"点击这里给我发消息\"> <strong>系统购买<\/strong><\/a><\/TD>");
document.writeln("<\/TR>");
document.writeln("<TR>");
document.writeln("<TD bgcolor=\"#FFFFFF\"><a target=blank href=tencent:\/\/message\/?uin=1049395267&Site=创立互联技术咨询&Menu=yes><img border=\"0\" SRC=http:\/\/wpa.qq.com\/pa?p=1:1049395267:4 alt=\"点击这里给我发消息\"> <strong>技术支持1<\/strong><\/a><\/TD>");
document.writeln("<\/TR><\/TABLE><\/TD><\/TR>");
document.writeln("<TR>");
document.writeln("<TD bgColor=#f9fcfd>");
document.writeln("<DIV align=center><strong>400-676-6872<\/strong><\/DIV><\/TD>");
document.writeln("<\/TR><\/TABLE><\/TD>");
document.writeln("<TD vAlign=top align=middle width=12 rowSpan=100><IMG src=\"\/img\/talk.gif\"> <\/TD><\/TR>");
document.writeln("<SCRIPT language=JavaScript1.2>");
document.writeln("<!--");
document.writeln("if (document.all||document.layers)");
document.writeln("makeStatic();");
document.writeln("");
document.writeln("if (document.layers) {");
document.writeln("window.onload=position;");
document.writeln("}");
document.writeln("");
document.writeln("var sitems=new Array();");
document.writeln("var sitemlinks=new Array();");
document.writeln("");
document.writeln("function hl(n) {");
document.writeln("n.className=\'hl\'}");
document.writeln("function n(h) {");
document.writeln("h.className=\'n\'}");
document.writeln("\/\/--><\/SCRIPT>");
document.writeln("<\/TABLE>");
document.writeln("<SCRIPT language=JavaScript1.2>");
document.writeln("if (document.all)");
document.writeln("document.write(\'<\\\/DIV>\')");
document.writeln("<\/SCRIPT>");
document.writeln("<\/LAYER><!-- 左隐藏菜单END -->");

解决方案 »

  1.   

    哪个年代的js啊?
    document.writeln 太多看着头痛document.writeln("if (document.all) {");
    document.writeln("object1.style.pixelLeft += x;");
    document.writeln("object1.style.pixelTop  += y;}");
    document.writeln("else");
    document.writeln("if (document.layers) {");
    document.writeln("document.object1.left += x;");
    document.writeln("document.object1.top  += y;");
    document.writeln("}};;")===》
    document.writeln("var obj = document.GetElementById('object1');obj.style.left = parseInt(obj.style.left)+x+'px';obj.style.top = parseInt(obj.style.top)+y+'px';");
    这样才兼容多浏览器其它地方,自己对着慢慢改