<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title><style>
#test{ background-color:red; height:100px;width:100px;position:absolute;}
</style>
</head>
<body>
</body>
<script>
window.onm
window.onmouseup=function() //IE不支持window.onmouseup吗?为什么FF能行~~~IE没反映
{
alert("1");
}</script>
</html>
2. 如果用<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
body中加点内容,在内容上点击。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style>
#test{ background-color:red; height:100px;width:100px;position:absolute;}
#pad{width:100%;}
</style>
<script>
window.onload=function(){
document.body.onmouseup=function()
{
alert("1");
}
}
</script>
</head>
<body><div id="pad">xxxxxxxx</div>
</body>
</html>
http://msdn.microsoft.com/en-us/library/ms535873(VS.85).aspx#