1、 ||含义 : 返回第一个有效值
eg :
<script type="text/javascript"> var a="";
var c = a || "||返回第一个有效值";
alert(c);
</script> 返回 : 后者值
2、window可接受的事件 onload
onload事件会在页面or图像加载完成后立即发生
<html>
<head>
<script type="text/javascript">
function load()
{
alert('onload 事件会在页面或图像加载完成后立即发生');
}
</script>
</head> <body onload="load()"> <div>国庆厦门之旅爽爽的</div>
<div>国庆厦门之旅爽爽的</div>
<div>国庆厦门之旅爽爽的</div>
<div>国庆厦门之旅爽爽的</div>
<div>国庆厦门之旅爽爽的</div>
<div>国庆厦门之旅爽爽的</div>
<div>国庆厦门之旅爽爽的</div>
<div>国庆厦门之旅爽爽的</div>
<div>国庆厦门之旅爽爽的</div>
<div>国庆厦门之旅爽爽的</div>
<div>国庆厦门之旅爽爽的</div>
<div>国庆厦门之旅爽爽的</div>
<div>国庆厦门之旅爽爽的</div>
<div>国庆厦门之旅爽爽的</div>
<div>国庆厦门之旅爽爽的</div>
<div>国庆厦门之旅爽爽的</div> </body> </html>