中包含一个checkbox,点击时不仅激活checkbox的click事件,还会激活td或者tr的click事件,称作bubble event。


$(“table tbody td”).click(function(e){
if( == “INPUT”){
alert(“It’s an input!”);
alert(“It’s not an input!”);

Firefox 调试 插件/扩展



方法就是修改firefox的设置,在地址栏输入about:config,然后允许chrome调试和远程调试: => true

devtools.debugger.remote-enable => true

然后在firefox里Tools > Web Developer > Browser Console.,打开调试窗口,里面有个debugger,这里就可以开始了。



Update April 2014: The browser debugger is now integrated in the “Browser Toolbox” and you no longer need to set about:config prefs. Just use the developer tools configuration/settings panel: “enable chrome debugging” and “enable remote debugging”. The “Browser Toolbox” will then be available in the developer tools panel.

Chromebug has not worked for me for many months. I think it’s just been silently abandoned but thankfully on Firefox 19 or later, it’s possible to use the built-in JS debugger on the browser itself. Go to about:config and set the following two prefs: true
devtools.debugger.remote-enabled: true

After you restart the browser, the Web Developer menu will contain a “Browser Debugger” entry.

More info here:

If possible, I’d suggest using Aurora for your debugging because the built-in debugger was a little limited when first launched and keeps getting better with every release.