<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>测试页面</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
document.open();
document.write('测试开始...............................');
document.close();
</script>
<script>
$(function(){
alert('DOM资源已经加载完成!');
})
</script>
</head>
<!--body onload IE浏览器支持-->
<body onload="alert('body on load!');">
<div id="content">
<div></div>
</div>
<script>
//绑定window.onload事件
window.onload = function(){alert('页面全部资源已经加载完成1');};
//重复绑定window.onload事件
$(window).load(function(){
alert('页面全部资源已经加载完成2');
});
document.write('测试结束...............................');
</script>
</body>
</html>
|