<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>浏览器对象模型中的几个示例</title>
</head>
<body>
<script type="text/javascript">
//onload事件
onload=function(){
document.write("hello world!");
}
//定时器
setTimeout(
function(){
document.write("我是定时器!已经执行了!");
},
//这里的意思即是,
//当“hello world!”执行完了之后2秒,
//上面那段话才出现。
2000
);
//转发
//这两个功能是一样的
location="http://www.sina.com";
// location.href="http://www.sina.com";
</script>
</body>
</html>
onload事件
定时器