-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbubblingTest.html
More file actions
46 lines (37 loc) · 789 Bytes
/
bubblingTest.html
File metadata and controls
46 lines (37 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
a{display:inline-block}
#out{width:80px;height:80px;background:red}
#inObj{width:40px;height:30px;background:blue}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script><!-- [D] 테스트용 js -->
</head>
<body>
<a href="http://naver.com" id="out">
<button type="button" id="inObj"></button>
</a>
<script type="text/javascript">
/*
var inObj = document.getElementById("inObj");
var out = document.getElementById("out");
out.onclick = function(){
alert("OUT")
}
inObj.onclick = function(){
alert("IN");
return false
}
*/
$("#out").click(function(){
alert("IN")
})
$("#inObj").click(function(){
alert("OUT")
return false
})
</script>
</body>
</html>