1

这里是 javascript 函数,当锚标记单击和第二个锚标记在 Internet Explorer 中不起作用时调用它

<Script type="text/javascript"> 
     var $J = jQuery.noConflict();
  function ToggleComment() {
        if (!($J('#Comments1').is(":visible"))) {       
                  $J('#Disclaimer').toggle();
        }
}

function f_show_comments()  {       
        $J('#Disclaimer').hide();
        $J('#Comments1').show();
}

    </script>
    <html>
    <body>

        <div align="center" style="margin:10px 0;">
        <b><a href="" onclick="ToggleComment();return false;" style="FONT-SIZE: 13px; COLOR:#1F3E61; FONT-FAMILY: Georgia,Times New Roman, Times, serif;"> Click here to post your comments about this article.</a>
        <a href="" id="c" onclick="f_show_comments();return false;"  style="FONT-SIZE: 14px; color:#cc0000; FONT-FAMILY: Georgia,Times New Roman, Times, serif;" >Click here to accept the terms of this disclaimer.</a></b>
        </div>

        <div id="Disclaimer" style="display:none;">
            <P align=center><STRONG>SUMMARY DISCLAIMER AND TERMS OF USE</STRONG></P>

            <P>Minors should seek parental permission before submitting a post.</P>
            <P>All comments submitted may be reviewed and edited by the Communications department before going live on the website.</P>

            <P>For the complete Terms of Use, please <a target="_blank" href="http://www.newmiamiarch.org/Atimo_s/news/Terms of Service.pdf">click here</a>.</P>
        </div>

        <div id="Comments1" style="display:none;" align="center">
            <p align="left">Your comment will be submitted to the web stie.  
            While are contact references that will only be used by the staff  </p>

        </div>
    </body>
    </html>
4

1 回答 1

0

更改您的 JavaScript 函数体,以及一些 html 属性值。

<script type="text/javascript">
        var $J = jQuery.noConflict();

        function ToggleComment() {
            if (!($J('#Disclaimer').is(":visible"))) {
                $J('#Disclaimer').show();
                 $J('#Comments1').hide();
            }
        }

        function f_show_comments() {
            if (!($J('#Comments1').is(":visible"))) {
                $J('#Comments1').show();
                $J('#Disclaimer').hide();
            }
        }
    </script>
    <div align="center" style="margin:10px 0;"> <b><a href="javascript:void(0);" onclick="ToggleComment();" style="FONT-SIZE: 13px; COLOR:#1F3E61; FONT-FAMILY: Georgia,Times New Roman, Times, serif;"> Click here to post your comments about this article.</a>
    <a href="javascript:void(0);" id="c" onclick="f_show_comments();"  style="FONT-SIZE: 14px; color:#cc0000; FONT-FAMILY: Georgia,Times New Roman, Times, serif;" >Click here to accept the terms of this disclaimer.</a></b>

    </div>
    <div id="Disclaimer" style="display:none;">
        <P align=center>
            <STRONG>SUMMARY DISCLAIMER AND TERMS OF USE</STRONG></P>

        <P>Minors should seek parental permission before submitting a post.</P>
        <P>All comments submitted may be reviewed and edited by the Communications department before going live on the website.</P>

        <P>For the complete Terms of Use, please <a target="_blank" href="http://www.newmiamiarch.org/Atimo_s/news/Terms of Service.pdf">click here</a>.</P>
    </div>

    <div id="Comments1" style="display:none;" align="center">
        <p align="left">Your comment will be submitted to the web stie.  
        While are contact references that will only be used by the staff  </p>

    </div>
于 2012-09-11T16:14:14.737 回答