<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>《阻止jQuery事件冒泡》的评论</title>
	<atom:link href="http://www.allenle.com/archives/1882.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.allenle.com/archives/1882.html</link>
	<description>Allen Le&#039;s Blog</description>
	<lastBuildDate>Sun, 22 Jan 2012 14:34:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>作者：javascript和jquery如何防止事件冒泡 &#187; Terry&#039;s Blog</title>
		<link>http://www.allenle.com/archives/1882.html/comment-page-1#comment-5773</link>
		<dc:creator>javascript和jquery如何防止事件冒泡 &#187; Terry&#039;s Blog</dc:creator>
		<pubDate>Thu, 23 Jun 2011 23:21:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.allenle.com/archives/1882.html#comment-5773</guid>
		<description>[...] //  &#8211;&gt;&lt;/script&gt; &lt; / head&gt; &lt; body &gt; &lt; div style = &#8221; background-color:Azure; &#8221;  mce_style = &#8221; background-color:Azure; &#8221; &gt; 目的当点击BBB的时候弹出TR,当点击AAA的时候弹出TD &lt; / div&gt; &lt; table &gt; &lt; tr onclick = &#8221; ClickTr(); &#8221; &gt; &lt; td onclick = &#8221; ClickTd(); &#8221; &gt; AAA &lt; / td&gt; &lt; td &gt; BBB &lt; / td&gt; &lt; / tr&gt; &lt; / table&gt; &lt; / body&gt; &lt; / html&gt;  2.方法 在IE下解决问题很简单，用onMouseEnter、onMouseLeave 来代替onMouseOver、onMouseOut就行了，他们的作用基本相同，前者不会发生冒泡。但是firefox下没有这两个事件. 3.方法: window.event.cancelBubble = true (IE)    event.stopPropagation()  event.preventDefault() (Firefox) 阻止jQuery事件冒泡 [...]</description>
		<content:encoded><![CDATA[<p>[...] //  &#8211;&gt;&lt;/script&gt; &lt; / head&gt; &lt; body &gt; &lt; div style = &#8221; background-color:Azure; &#8221;  mce_style = &#8221; background-color:Azure; &#8221; &gt; 目的当点击BBB的时候弹出TR,当点击AAA的时候弹出TD &lt; / div&gt; &lt; table &gt; &lt; tr onclick = &#8221; ClickTr(); &#8221; &gt; &lt; td onclick = &#8221; ClickTd(); &#8221; &gt; AAA &lt; / td&gt; &lt; td &gt; BBB &lt; / td&gt; &lt; / tr&gt; &lt; / table&gt; &lt; / body&gt; &lt; / html&gt;  2.方法 在IE下解决问题很简单，用onMouseEnter、onMouseLeave 来代替onMouseOver、onMouseOut就行了，他们的作用基本相同，前者不会发生冒泡。但是firefox下没有这两个事件. 3.方法: window.event.cancelBubble = true (IE)    event.stopPropagation()  event.preventDefault() (Firefox) 阻止jQuery事件冒泡 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：wayne</title>
		<link>http://www.allenle.com/archives/1882.html/comment-page-1#comment-4107</link>
		<dc:creator>wayne</dc:creator>
		<pubDate>Fri, 03 Dec 2010 02:27:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.allenle.com/archives/1882.html#comment-4107</guid>
		<description>if(window.event) {
						event.cancelBubble = true;//IE
					}else {
						event.stopPropagation();// 其它浏览器下阻止冒泡
					}
在ie下药这么处理。
不过live的情况我还没有办法。</description>
		<content:encoded><![CDATA[<p>if(window.event) {<br />
						event.cancelBubble = true;//IE<br />
					}else {<br />
						event.stopPropagation();// 其它浏览器下阻止冒泡<br />
					}<br />
在ie下药这么处理。<br />
不过live的情况我还没有办法。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：牛腩</title>
		<link>http://www.allenle.com/archives/1882.html/comment-page-1#comment-1850</link>
		<dc:creator>牛腩</dc:creator>
		<pubDate>Fri, 27 Nov 2009 03:56:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.allenle.com/archives/1882.html#comment-1850</guid>
		<description>太棒了。。正好需要用到这个。。原来只是return false;这么简单啊。。呵呵。。多谢楼主了。。。</description>
		<content:encoded><![CDATA[<p>太棒了。。正好需要用到这个。。原来只是return false;这么简单啊。。呵呵。。多谢楼主了。。。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Allen</title>
		<link>http://www.allenle.com/archives/1882.html/comment-page-1#comment-1612</link>
		<dc:creator>Allen</dc:creator>
		<pubDate>Fri, 09 Oct 2009 13:37:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.allenle.com/archives/1882.html#comment-1612</guid>
		<description>一个叫SyntaxHighlighter的Wordpress插件，快转到Wordpress吧，哈哈。</description>
		<content:encoded><![CDATA[<p>一个叫SyntaxHighlighter的Wordpress插件，快转到Wordpress吧，哈哈。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：charley</title>
		<link>http://www.allenle.com/archives/1882.html/comment-page-1#comment-1611</link>
		<dc:creator>charley</dc:creator>
		<pubDate>Fri, 09 Oct 2009 04:37:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.allenle.com/archives/1882.html#comment-1611</guid>
		<description>代码格式很好看</description>
		<content:encoded><![CDATA[<p>代码格式很好看</p>
]]></content:encoded>
	</item>
</channel>
</rss>

