how to check javascript syntax error

久未见 提交于 2019-12-13 02:25:32

问题


Firebug looks not capable to check js syntax error...

Is there any good way to do that?

Currently I just wrote a js but the firebug didn't show any error but the functionality is totally broken.


回答1:


Firebug does do it. Make sure that you have JavaScript Console enabled, you can do so by clicking the Console dropdown and from their select Enabled. You need to press F12 key to open firebug and once you refresh the page, you will see any errors you have in your script in the firebug js console.

If you are using Firefox, you can also press Contr+Shift+J to open firefox's error dialog.




回答2:


are you sure Firebug is turned on? If it's on, the little bug in the lower right is colored brown. if it's not on, the bug is gray.

also, I find that Web Inspector in Safari/Chrome is better.



来源:https://stackoverflow.com/questions/3984507/how-to-check-javascript-syntax-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!