onclick跳到页面顶部(需要停止此操作)

|
<body onload=\"init();\">
        <center>
        <form id=\"selector\">
            <select id=\"book\" onchange=\"initChapSelector();\"></select>
            <select id=\"chap\" onchange=\"initPageSelector();\"></select>
            <select id=\"page\" onchange=\"initDisplay();\"></select>
            <select id=\"scale\" onchange=\"setScale(this.options[this.selectedIndex].value);\">
                <option value=\"\">Original Width</option>
                <option value=\"100%\">Page Width</option>
                <option value=\"50%\">Half Page</option>
            </select>
            <a href=\"javascript:void(0)\" onclick=\"alert(\'Arrow up/down: scroll\\nArrow left/right: prev/next page\'); return false;\">Help</a>
        </form>
        <a href=\"javascript:void(0)\" onclick=\"moveToNextPage(); return false;\"> <img id=\"display\" style=\"max-width:100%\" src=\"./js/VKmanga/spinner.gif\"></a>

        </center>
 </body>
这是我的代码,在每次单击时,我的漫画查看器都跳到顶部 您可以在线观看http://dev.animelon.com/manga/ 我尝试过try1ѭ和其他几种方法似乎无济于事 谢谢     
已邀请:
根据firebug的介绍,您的
initDisplay
函数(view.js第215行)有have3行。这显然是导致浏览器滚动到顶部的原因;-)     
<a href=\"#\" onclick=\"return false;\">Link</a>
要么
<a href=\"#\" onclick=\"(function(e){e.preventDefault()/*do something here */}); return false;\">Link</a>
    

要回复问题请先登录注册