R
Ryan Chan
Hello,
I have following simple codes:
####################
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test</title>
<style>
#t1 {
width:400px;
height:300px;
background-color:green;
}
#t2 {
width:200px;
height:200px;
background-color:red;
margin-top:-100px;
}
</style>
</head>
<body>
<div id="t1" onclick="alert('t1');"></div>
<div id="t2" ></div>
</body>
</html>
####################
Just wonder why when clicking the overlapped area, the alert of t1
does not occur.
Thanks...
I have following simple codes:
####################
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test</title>
<style>
#t1 {
width:400px;
height:300px;
background-color:green;
}
#t2 {
width:200px;
height:200px;
background-color:red;
margin-top:-100px;
}
</style>
</head>
<body>
<div id="t1" onclick="alert('t1');"></div>
<div id="t2" ></div>
</body>
</html>
####################
Just wonder why when clicking the overlapped area, the alert of t1
does not occur.
Thanks...