我正在使用 jQuery 来让一些 div 在我的本地服务器上显示/隐藏。现在它在测试页面上工作正常但是当我每次使用时将它放入我的测试应用程序(用 PHP 和 HTML 编写)
<a href="#" 
创建一个钩子,它实际上也链接了 locahost/testsite/localhost#
什么可以将额外的 localhost# 添加到我的 URL 的末尾?
<script type="text/javascript" language="JavaScript">
        function controlFooterNotes(v){
                if(v==1) $("#footer_notes").show(50);
                else     $("#footer_notes").hide(50);
        }
        $(document).ready(function(){
                $("#show_footer_notes").click(function(){
                        controlFooterNotes(1);                      
                });
                $("#hide_footer_notes").click(function(){
                        controlFooterNotes(0);                      
                });
        });
</script>
和我使用的 html
This is an example of the <a href="#" id="show_footer_notes">Click this link</a>
<div id="footer_notes">
        <a href="#" id="hide_footer_notes">Click here to hide this part.</a>
</div>