- function cancelBubble(evt) {
- // 阻止事件冒泡
- if (window.event) {
- // Chrome,IE6,Opera
- window.event.cancelBubble = true;
- } else {
- // FireFox 3
- evt.stopPropagation();
- }
- }
- //该片段来自于http://www.codesnippet.cn/detail/091020136328.html
来源: http://www.codesnippet.cn/detail/091020136328.html