<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8" />
<script src="../Resource/scripts/jquery-1.8.3.min.js"></script>
</head>
<script>
$(function () {
$("#p").click(function () {
$(this).children("span").get(0).click();
});
});
</script>
<body>
<span id="p">父元素
<span id="c">子元素
</span>
</span>
</body>
<script>
$("#c").click(function (e) {
e.stopPropagation();
$("#c").html("子元素被调用");
});
</script>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8" />
<script src="../Resource/scripts/jquery-1.8.3.min.js"></script>
</head>
<script>
$(function () {
$("#p").click(function () {
$(this).children("span").get(0).click();
});
});
</script>
<body>
<span id="p">父元素
<span id="c">子元素
</span>
</span>
</body>
<script>
$("#c").click(function (e) {
e.stopPropagation();
$("#c").html("子元素被调用");
});
</script>
</html>