日期:2014-05-18  浏览次数:20368 次

滑动门的问题 此代码完成后在IE和MF下运行都正常 ,可是完成其他版块的内容后才发现此代码在MF下却完全失效 贴出来请帮忙查错!
页面使用了母版页 滑动门放在内容页中。我是新手,为求简单所以在js文件内直接写了控件的ClientID,请不要笑呵呵 
C# code
 <div  class="sell">
              <ul id="Ul1" class="sellMenu" runat="server">
                 <li id="tb_1" class="selected" onmousemove="xgz:HoverLi(1);" runat="server">东风天龙平板汽车</li>
                 <li id="tb_2" class="noselected" onmousemove="xgz:HoverLi(2);" runat="server">东风天龙牵引汽车</li>
                 <li id="tb_3" class="noselected" onmousemove="xgz:HoverLi(3);" runat="server">东风天龙专用汽车</li>
              </ul>
           </div>
           <div  class="sellBorder">
                  <div class="dis"   id="tbc_01">
                      <asp:Repeater
                           ID="repeater1"
                           runat="server">
                           <ItemTemplate>
                            <asp:HyperLink
                                ID="hyperlink2"
                                Text='<%#Eval("CheXingHao")%>'
                                NavigateUrl='<%#"~/CheXingDetails.aspx?CheXingID="+Eval("CheXingID")%>'
                                runat="server" />
                           </ItemTemplate>
                           </asp:Repeater>
                        <asp:HyperLink
                           ID="hyperlink4"
                           CssClass="gengduo"
                           NavigateUrl="~/CheXingList.aspx?LeiBieID=16"
                           Text="查看更多..."
                           runat="server" />
                  </div> 

JScript code
function g(o)
    {
     return document.getElementById(o);
    } 
function HoverLi(n)
{ 
    for(var i=1;i<=3;i++)
       {
        g('ctl00_ContentPlaceHolder1_getchexinglist_tb_'+i).className='noselected';
        g('tbc_0'+i).className='undis';
       }
       g('tbc_0'+n).className='dis';
       g('ctl00_ContentPlaceHolder1_getchexinglist_tb_'+n).className='selected'; 
}





------解决方案--------------------
检查你页面生成的html中是否存在相同id的控件;