| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 384 人关注过本帖
标题:IE6下网页需要点击停止js才生效,IE8没问题
只看楼主 加入收藏
zhucezhuany
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-3-2
结帖率:0
收藏
已结贴  问题点数:20 回复次数:1 
IE6下网页需要点击停止js才生效,IE8没问题
js效果是,鼠标滑过菜单时,出现对应内容!
网页中代码:
程序代码:
<table width="740" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="left" valign="top"><table width="740" border="0" cellspacing="0" cellpadding="0">
              <tr><%
              redim bid(4),btl(4),bpic(4)
              for i=1 to 4
              bid(i)=0
              next
              set rs=server.CreateObject("adodb.recordset")
              rs.open "select top 4 * from hotelsort where bsortid=1 order by pw_id desc,id desc",conn
              if not(rs.eof) then
                 i=1
                 while not(rs.eof)
                 bid(i)=rs("id")
                 btl(i)=rs("title")
                 bpic(i)=rs("pic")
                 i=i+1
                 rs.movenext
                 wend
              end if
              rs.close:set rs=nothing    
              %>
                <td width="164" height="50" rowspan="2"><img src="img/fk_top_left.gif" width="160" height="50" /></td>
                <td height="10"></td>
                </tr>
                <tr>
                <td width="575" background="img/fk_top_bg.gif" style="padding-left:3px;">
                <div id="xianluMiddle_top">
            <ul>
            <%
            for i=1 to 4
            %>
            <li class="tab<%if i=1 then
            response.Write("1")
            else
            response.Write("2")
            end if
            %>" id="m0<%=i%>"><%=lenstr(btl(i),7)%></li>
            <%next%> 
            </ul>
           </div>                </td>
                <td width="1"></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td align="left" valign="top"><table width="740" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="11" height="6"></td>
                <td width="200"></td>
                <td width="495" height="6"></td>
              </tr>
              <tr>
                <td ></td>
                <td align="left" width="200"><img src="img/fk_bz1.jpg" border="0"/></td>
                <td align="left" valign="top" style="padding-left:4px;">
               <%for i=1 to 4%>              
                <%
                    set rs=server.CreateObject("adodb.recordset")
                    rs.open "select top 8 * from hotel where bsortid=1 and sortid="&bid(i)&" order by pw_id desc,id desc",conn
                    if not(rs.eof) then
                       title=rs("title")
                       other=rs("other")
                    %>
                <div id="c0<%=i%>" <%if i>=2 then response.Write("style='display:none;'") end if%>>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                <td colspan="3" align="right"><a href="111.asp"><img src="img/fk_yuyue.jpg" width="108" height="40" border="0"/></a>
                </td>
                <tr>
                  <tr>
                    <td width="153"><a href="bz.asp?bsortid=1&sortid=<%=bid(i)%>"><img src="pic/hotelsort/<%=bpic(i)%>" width="115" height="150" class="newbord2" border="0"  alt="<%=btl(i)%>"/></a></td>
                    <td width="16"></td>
                    <td width="322" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td align="left" height="50" valign="middle">&nbsp;&nbsp;<a href="show.asp?id=<%=rs("id")%>" title="<%=title%>" class="menu4"><%=lenstr(title,16)%></a></td>
                      </tr>
                      <tr>
                        <td align="left" valign="top" class="font7" style="border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: #c9c9c9; padding-bottom:5px;"><%=lenstr(other,125)%><a href="show.asp?id=<%=rs("id")%>" class="menu5">[详细]</a></td>
                      </tr>
                    </table>                    </td>
                  </tr>
                </table>
                      <table width="100%" border="0" cellspacing="0" cellpadding="1" style="margin-top:5px;">
                       <div id="bfzl"> <%
                        while not(rs.eof)
                        title=rs("title")
                        %>
                       
                         <div id="bfzl_bt"><img src="img/ico2.gif" width="5" height="5" />
                         <a href="show.asp?id=<%=rs("id")%>"><%=lenstr(title,18)%></a></div>
                      
                        <%
                        rs.movenext
                        wend
                       
                        %>
                        </div>
                      </table><%end if
                      rs.close:set rs=nothing
                      %>
                </div>
                <%next%>                  </td>
                <td width="34" ></td>
              </tr>
             </table></td>
          </tr>
        </table>
js部分:
程序代码:
function scrollDoor(){
}
scrollDoor.prototype = {
sd : function(menus,divs,openClass,closeClass){
var _this = this;
if(menus.length != divs.length)
{
alert("菜单层数量和内容层数量不一样!");
return false;
}
for(var i = 0 ; i < menus.length ; i++)
{
_this.$(menus[i]).value = i;
_this.$(menus[i]).onmouseover = function(){
for(var j = 0 ; j < menus.length ; j++)
{
_this.$(menus[j]).className = closeClass;
_this.$(divs[j]).style.display = "none";
}
_this.$(menus[this.value]).className = openClass;
_this.$(divs[this.value]).style.display = "block";
}
}
},
$ : function(oid){
if(typeof(oid) == "string")
return document.getElementById(oid);
return oid;
}
}
window.onload = function(){
var SDmodel = new scrollDoor();
SDmodel.sd(["m01","m02","m03","m04"],["c01","c02","c03","c04"],"tab1","tab2");
SDmodel.sd(["n01","n02","n03","n04"],["d01","d02","d03","d04"],"tab1","tab2");
SDmodel.sd(["h01","h02","h03","h04"],["e01","e02","e03","e04"],"tab1","tab2");
SDmodel.sd(["j01","j02","j03","j04"],["f01","f02","f03","f04"],"tab1","tab2");
SDmodel.sd(["k01","k02","k03","k04"],["g01","g02","g03","g04"],"tab1","tab2");
    new Youa("box");
}
是浏览器兼容问题?就这段代码上传到不同服务器空间,有的可以,有的不行?为了看效果,我要给两个地址,不是广告

搜索更多相关主题的帖子: 鼠标 菜单 网页 
2012-03-02 10:21
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:20 
把地址贴出看看,不会封你的
2012-03-02 11:28
快速回复:IE6下网页需要点击停止js才生效,IE8没问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.026712 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved