【求助】一段JS火狐瀏覽器下正常,IE瀏覽器下不正常。

mrreg發表於2011-03-26

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
	<script type="text/JavaScript" src="http://www.vancl.com/PublicControls/js/cookies_oper.js"></script>
	<style type="text/css">
		floatad-winpop
		{
			width: 356px;
			height: 0px;
			position: absolute;
			right: 0;
			bottom: 0;
			margin: 0;
			padding: 1px;
			overflow: hidden;
			display: none;
		}
		floatad-winpop .title
		{
			width: 100%;
			height: 22px;
			line-height: 20px;
			background: a10000;
			font-weight: bold;
			text-align: center;
			font-size: 12px;
		}
		floatad-winpop .con
		{
			width: 100%;
			height: 90px;
			line-height: 80px;
			font-weight: bold;
			font-size: 12px;
			color: FF0000;
			text-decoration: underline;
			text-align: center;
		}
		.floatad-close
		{
			position: absolute;
			right: 12px;
			top: 8px;
			color: FFF;
			cursor: pointer;
		}
		.floatad-blank43
		{
			clear: both;
			display: block;
			overflow: hidden;
			height: 43px;
		}
		.floatad-setTabMenu strong
		{
			width: 80px;
			height: 65px;
			display: block;
			position: absolute;
			left: 0;
			top: -43px;
		}
		.floatad-setTabMenu strong a
		{
			width: 80px;
			height: 65px;
			display: block;
		}
		.floatad-windowBox
		{
			padding: 0;
			margin: 0;
			width: 352px;
			height: 290px;
			background: url(http://images.vancl.com/vjiafloatad/20100906/windowBg.gif) no-repeat;
			font-size: 12px;
			font-family: "宋體";
		}
		.floatad-setTab
		{
			padding: 0;
			margin: 0;
			width: 337px;
			margin: 0 auto;
		}
		.floatad-setTabMenu
		{
			padding: 0;
			margin: 0;
			width: 337px;
			height: 23px;
			line-height: 23px;
			border-bottom: 1px solid ddd;
			position: relative;
		}
		.floatad-setTabMenu ul
		{
			padding: 0;
			margin: 0;
			float: right;
			display: inline;
			position: absolute;
			right: 0;
			top: 0;
		}
		.floatad-setTabMenu li
		{
			padding: 0;
			margin: 0;
			width: 64px;
			height: 23px;
			margin-left: 1px;
			float: left;
			display: inline;
			cursor: pointer;
		}
		style1
		{
			background: url(http://images.vancl.com/vjiafloatad/20100906/today.gif) no-repeat;
		}
		style2
		{
			background: url(http://images.vancl.com/vjiafloatad/20100906/men.gif) no-repeat;
		}
		style3
		{
			background: url(http://images.vancl.com/vjiafloatad/20100906/women.gif) no-repeat;
		}
		style4
		{
			background: url(http://images.vancl.com/vjiafloatad/20100906/sports.gif) no-repeat;
		}
		.floatad-setTabMenu li.floatad-hoverstyle1
		{
			height: 24px;
			background: url(http://images.vancl.com/vjiafloatad/20100906/todayHover.gif) no-repeat;
		}
		.floatad-setTabMenu li.floatad-hoverstyle2
		{
			height: 24px;
			background: url(http://images.vancl.com/vjiafloatad/20100906/menHover.gif) no-repeat;
		}
		.floatad-setTabMenu li.floatad-hoverstyle3
		{
			height: 24px;
			background: url(http://images.vancl.com/vjiafloatad/20100906/womenHover.gif) no-repeat;
		}
		.floatad-setTabMenu li.floatad-hoverstyle4
		{
			height: 24px;
			background: url(http://images.vancl.com/vjiafloatad/20100906/sportsHover.gif) no-repeat;
		}
		.floatad-setTabCon img
		{
			border: none;
		}
		con_style_1
		{
			width: 335px;
			clear: both;
			border: 1px solid ddd;
			border-top: none;
			text-align: center;
		}
		con_style_2 div img, con_style_3 div img, con_style_4 div img
		{
			padding: 3px;
			border: 1px solid dedede;
			border-top: 0;
		}
		.floatad-setTabCon ul
		{
			padding: 0px;
			margin: 0px;
			margin-left: 2px;
		}
		.floatad-setTabCon li
		{
			margin-right: 2px;
			margin-top: 6px;
			float: left;
			display: inline;
		}
		div.floatad-setTabCon li img
		{
			width: 78px;
			height: 31px;
			border: 2px solid dedede;
		}
	</style>
<script type="text/javascript">
			window.onload = function () {
                document.getElementById('floatad-winpop').style.height = '0px';
                var isIE6 = !window.XMLHttpRequest;
                if (isIE6) {
                    $("floatad-winpop").css({ position: "absolute" });
                }
                setTimeout("tips_pop()", 800);
                BindTab();
            }
var CurPopPub = 1;
var PopPubHandle = null;
function SetPopPubhandle() {
    setTab('style', CurPopPub, 4);
    PopPubHandle = setInterval(function () { setTab('style', CurPopPub, 4); CurPopPub++; if (CurPopPub == 5) CurPopPub = 1; }, 3000);
}
function BindTab() {
    $("[id^='style']").each(function (i) {
        $(this).mouseover(function () { if (PopPubHandle) clearInterval(PopPubHandle); CurPopPub = parseInt(i) + 1; setTab('style', CurPopPub, 4); })
    .mouseout(function () { SetPopPubhandle(); });
    });
    $("[id^='con_one_']").each(function () {
        $(this).mouseover(function () { if (PopPubHandle) clearInterval(PopPubHandle); }).mouseout(function () { SetPopPubhandle(); });
    });
    SetPopPubhandle();
};
function setTab(name, cursel, n) {
    for (i = 1; i <= n; i++) {
        var menu = document.getElementById(name + i);
        var con = document.getElementById("con_" + name + "_" + i);
        menu.className = i == cursel ? "floatad-hover" : "";
        con.style.display = i == cursel ? "block" : "none";
    }
}
function tips_pop() {
    var MsgPop = document.getElementById("floatad-winpop");
    var popH = parseInt(MsgPop.style.height);
    if (popH == 0) {
        MsgPop.style.display = "block";
        show = setInterval("changeH('up')", 2);
    }
    else {
        hide = setInterval("changeH('down')", 2);
    }
}
function changeH(str) {
    var MsgPop = document.getElementById("floatad-winpop");
    var popH = parseInt(MsgPop.style.height);
    if (str == "up") {
        if (popH <= 293) {
            MsgPop.style.height = (popH + 4).toString() + "px";
        }
        else {
            clearInterval(show);
        }
    }
    if (str == "down") {
        if (popH >= 4) {
            MsgPop.style.height = (popH - 4).toString() + "px";
        }
        else {
            clearInterval(hide);
            MsgPop.style.display = "none";
        }
    }
}
</script>
<div id="floatad-winpop" style="z-index:9;position:fixed;;right:0;bottom:0;overflow:hidden;_margin-top:expression(document.documentElement.clientHeight-this.style.pixelHeight+document.documentElement.scrollTop);">
<div class=""><span class="floatad-close" onclick="tips_pop()"><img src="http://images.vancl.com/vjiafloatad/20100906/close.gif" alt="關閉" title="關閉"></span></div>
 <div class="floatad-windowBox">
  <span class="floatad-blank43"></span>
  <div class="floatad-setTab">
   <div class="floatad-setTabMenu">
   <strong><a href="http://www.vancl.com/" target="_blank"></a></strong>
    <ul>
     <li id="style1" onmouseover="setTab('style',1,4)" class="floatad-hover"></li>
     <li class="" id="style2" onmouseover="setTab('style',2,4)"></li>
     <li class="" id="style3" onmouseover="setTab('style',3,4)"></li>
     <li class="" id="style4" onmouseover="setTab('style',4,4)"></li>
    </ul>
   </div>
   <div class="floatad-setTabCon">
    <div style="display: block;" id="con_style_1"><a href="<{$setting.vanclad_pic_link1}>" target="_blank" title=""><img src="<{$setting.vanclad_pic1}>" alt="" title=""></a><a href="<{$setting.vanclad_pic_link2}>" target="_blank" title=""><img src="<{$setting.vanclad_pic2}>" alt="" title=""></a><a href="<{$setting.vanclad_pic_link3}>" target="_blank" title=""><img src="<{$setting.vanclad_pic3}>" alt="" title=""></a></div>
	<div id="con_style_2" style="display: none;">
	 <div><{$setting.dier}></div>
	 </div>
	<div id="con_style_3" style="display: none;">
     <div><{$setting.disan}></div>
    </div>
	<div id="con_style_4" style="display: none;">
     <div><{$setting.disi}></div>
    </div>
   </div>
  </div>
 </div>
</div>
<p class="indent">


在火狐瀏覽器下,正常顯示,網頁右下角。
在IE瀏覽器下錯誤,網頁右下角沒有顯示。
請問需要修改哪裡呢?高手幫忙,謝謝!

相關文章