88487901 2012-12-25
代码如下:
<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="Default5.aspx.cs"Inherits="Default5"%>
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">
<title>Porschev---Jquery事件冒泡</title>
<scriptsrc="jquery-1.3.2-vsdoc.js"type="text/javascript"></script>
</head>
<body>
<formid="form1"runat="server">
<divid="divOne"onclick="alert('我是最外层');">
<divid="divTwo"onclick="alert('我是中间层!')">
<aid="hr_three"href="http://www.baidu.com"mce_href="http://www.baidu.com"onclick="alert('我是最里层!')">点击我</a>
</div>
</div>
</form>
</body>
</html> 代码如下:
<scripttype="text/javascript">
$(function(){
$("#hr_three").click(function(event){
event.stopPropagation();
});
});
<script> 代码如下:
<scripttype="text/javascript">
$(function(){
$("#hr_three").click(function(event){
returnfalse;
});
});
<script> <table id="table" class="table table-striped table-bordered table-hover table-nowrap" width="100%&qu