javascript 事件屏蔽问题

大家好,我现在 .....
现在 两个click事件都会调用如何在点击 checkbox 时屏蔽掉外部click事件

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


阻止JavaScript事件冒泡传递(cancelBubble 、stopPropagation)
function doSomething (obj,evt) { alert(obj.id); var e=(evt)?evt:window.event; if (window.event) { e.cancelBubble=true; } else { //e.preventDefault(); e.stopPropagation(); } }


This is parent1 div.

This is child1.

This is parent1 div.



This is parent2 div.

This is child2. Will bubble.

This is parent2 div.



[url]http://www.google.cn/search?hl=zh-CN&q=javascript+%E9%98%BB%E6%AD%A2%E4%BA%8B%E4%BB%B6%E5%86%92%E6%B3%A1&btnG=Google+%E6%90%9C%E7%B4%A2&meta=&aq=0&oq=javascript+%E9%98%BB%E6%AD%A2%E4%BA%8B%E4%BB%B6[/url]