Last active
August 29, 2015 13:57
-
-
Save joeylin/9661078 to your computer and use it in GitHub Desktop.
浏览器跳转对js调试的影响
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <a class="no-href" href="">test</a>; | |
| $('.no-href').on('click', function(){ | |
| // do some stuff | |
| // some error happens | |
| return false; | |
| }); | |
| bug: 没有在href上面加内容时,会造成发生错误时候自动跳转,错误被忽略,偶尔会出现断点也无法跟踪的现象。 | |
| 解决方法: 在href上面加个#使之不跳转。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment