Javascript 手风琴在IE6中出错

Javascript 手风琴在IE6中出错,javascript,html,internet-explorer-6,Javascript,Html,Internet Explorer 6,有人能帮我弄清楚为什么我的手风琴手稿在IE6里弄得一团糟吗 与更现代的浏览器不同,如果我点击“作品是否受版权保护”、“作品的特定使用是否需要许可”,它会触发两个onclick事件 我认为这与在中点击有关,但我不确定如何解决这个问题 非常感谢您的帮助 编辑:代码: <script> function treatlink(e) { if (!e) e = window.event; if (e.cancelBu

有人能帮我弄清楚为什么我的手风琴手稿在IE6里弄得一团糟吗

与更现代的浏览器不同,如果我点击“作品是否受版权保护”、“作品的特定使用是否需要许可”,它会触发两个onclick事件

我认为这与在
中点击
  • 有关,但我不确定如何解决这个问题

    非常感谢您的帮助

    编辑:代码:

    <script>
        function treatlink(e) {
            if (!e)
                  e = window.event;
    
                if (e.cancelBubble)
                  e.cancelBubble = true;
                else
                  e.stopPropagation();
        }
    
        function togglemore(z) {
            y=document.getElementById(z);
            w=document.getElementById('img'+z);
            if (y.style.display=="none") { 
                y.style.display="block"; 
                w.src='/images/icons/closemore1.png'
            } else { 
                y.style.display="none"; 
                w.src='/images/icons/openmore1.png'
            }
        }
    
    
    </script>
    
        <ul class="dash">
    
            <li class='dash' onclick='togglemore("service_a"); return false;'>Legal opinions as to:
                <a href='#' onclick='return false;'><img id='imgservice_a' src='/images/icons/openmore1.png' style='vertical-align:text-top; padding-left:8px; border:0px; padding-right:5px; position:relative; top:7px;' title='Read More' alt='Read More'></a>
                <div id='service_a' style='display:none; width:600px;margin-left:50px;padding:6px;border:1px dotted #bbbbbb;'>Legal opinions may be provided in writing or as part of face-to-face, telephone or skype consultations.</div>
            </li>
    
            <ul class="dash">
    
            <li class='checkmark' onclick='togglemore("service01"); return false;'>whether a work is protected by copyright;
                <a href='#' onclick='return false;'><img id='imgservice01' src='/images/icons/openmore1.png' style='vertical-align:text-top; padding-left:8px; border:0px; padding-right:5px; position:relative; top:7px;' title='Read More' alt='Read More'></a>
                <div id='service01' style='display:none; width:600px;margin-left:50px;padding:6px;border:1px dotted #bbbbbb;'><p><i>Copyright Act</i> provides that copyright subsists in &ldquo;every original literary, dramatic, musical and artistic work&rdquo;. However, the scope of copyright protection is not indefinite.<p>It is of utmost importance to clearly understand if a particular result of creative activity is protected by copyright &ndash; whether you are planning to rely on that IP as your asset or whether you are planning to use someone else&rsquo;s work.</div>
            </li>
    
    
            <li class='checkmark' onclick='togglemore("service02"); return false;'>whether a particular use of the work requires permission;
                <a href='#' onclick='return false;'><img id='imgservice02' src='/images/icons/openmore1.png' style='vertical-align:text-top; padding-left:8px; border:0px; padding-right:5px; position:relative; top:7px;' title='Read More' alt='Read More'></a>
                <div id='service02' style='display:none; width:600px;margin-left:50px;padding:6px;border:1px dotted #bbbbbb;'><p>Even if a work is protected by copyright, not every single use of it requires permission from the copyright owner.<p>Some uses fall under the category of fair dealing, and some uses fall outside the legal definition of what &ldquo;use&rdquo; means under the <i>Copyright Act</i>.</div>
            </li>
    
    
            <li class='checkmark' onclick='togglemore("service03"); return false;'>whether a particular use of the work infringes copyright;
                <a href='#' onclick='return false;'><img id='imgservice03' src='/images/icons/openmore1.png' style='vertical-align:text-top; padding-left:8px; border:0px; padding-right:5px; position:relative; top:7px;' title='Read More' alt='Read More'></a>
                <div id='service03' style='display:none; width:600px;margin-left:50px;padding:6px;border:1px dotted #bbbbbb;'><p>Under the <i>Copyright Act</i>, it &ldquo;is an infringement of copyright for any person to do, without the consent of the owner of the copyright, anything that by this Act only the owner of the copyright has the right to do.&rdquo;<p>The question is whether a particular use falls under the scope of what only the owner of copyright can do and whether a particular use can be excused under the fair dealing provisions.</div>
            </li>
    
            </ul>
    
    
    功能链接(e){
    如果(!e)
    e=窗口事件;
    如果(如取消气泡)
    e、 取消气泡=真;
    其他的
    e、 停止传播();
    }
    功能切换更多(z){
    y=document.getElementById(z);
    w=document.getElementById('img'+z);
    如果(y.style.display==“无”){
    y、 style.display=“block”;
    w、 src='/images/icons/closemore1.png'
    }否则{
    y、 style.display=“无”;
    w、 src='/images/icons/openmore1.png'
    }
    }
    
    • 关于下列事项的法律意见: 法律意见可以书面形式提供,也可以作为面对面、电话或skype咨询的一部分提供。
      • 作品是否受版权保护; 《版权法》规定,版权存在于;所有原创文学、戏剧、音乐和艺术作品;。然而,版权保护的范围并不是无限的。最重要的是要清楚地了解创作活动的特定结果是否受版权保护&ndash;您是否计划将该知识产权作为您的资产,或者是否计划使用其他人的知识产权;这是工作。
      • 工作的特定用途是否需要许可; 即使作品受版权保护,也不是每一次使用都需要版权所有者的许可。有些用途属于公平交易范畴,有些用途不属于什么的法律定义&ldquo;使用&rdquo;根据《版权法》的规定。
      • 作品的特定用途是否侵犯版权; 根据《版权法》,它是;未经版权所有人同意,任何人在本法中只有版权所有人有权做的任何事情,都是对版权的侵犯。” 问题是,某一特定用途是否属于只有版权所有人才能做的范围,以及某一特定用途是否可以根据公平交易条款获得豁免。

    IE6忽略关闭
    标记,因此第263行的内部
    被解释为位于其上方的
  • 内部,而在现代浏览器中,它被解释为
  • 的兄弟


    您应该通过将内部
    放在外部

    • 中来修复无效性欢迎使用堆栈溢出!请在这里添加一些相关代码(可能还有一个JSFIDLE示例)。由于只有一个外部链接,一旦问题解决,这个问题对未来的读者将没有任何价值。谢谢IE6@你:统计数据很有趣,但如果你正在为特定市场开发一个应用程序,那么这个图表几乎毫无用处。例如,IE6在诊断工程领域似乎仍有很多应用。@Tomalak:我的观点是正确的,但很明显这是一个针对普通用户的页面,所以我认为这里的图表适用。我的方法很简单。如果可以让它在IE6中工作,而不必牺牲在新浏览器中的工作方式,我宁愿让它在IE6中工作,而不管它的市场份额。我肯定你已经发现了问题,但我不确定我是否理解你对如何解决问题的回应。我需要将
      ul
      放在何处?在3个
    • 中的每一个内,还是添加另一个全局
    • ?不要移动或复制它。只需将
      更改为
      • ,将
          更改为
      • 。您可能需要调整样式以允许添加