1. window对象属性
<!DOCTYPE html>
<head>
<title>window对象属性 </title>
<script type="text/javascript">
window.status="等待客户提交数据....."
function ShowWindowInfo(){
alert("屏幕宽度:"+window.screen.width+"屏幕高度:"+window.screen.height);
}
</script>
</head>
<body>
<input type="button" value="查看屏幕信息" onclick="ShowWindowInfo()"/>
</body>
</html>
2.全选效果
<!DOCTYPE html>
<head>
<title>全选效果 </title>
<script type="text/javascript">
window.status="等待客户提交数据....."
function selectAll(csstatus){
var sItems=document.getElementsByName("selectItem");
for(var i = 0;i<sItems.length;i++){
sItems[i].checked=csstatus;
}
}
</script>
</head>
<body>
<input type="checkbox" onclick="selectAll(this.checked)"/><br/> 全选<br/>
<input type="checkbox" name="selectItem" /> 西服 <br/>
<input type="checkbox" name="selectItem" /> 短袖 <br/>
<input type="checkbox" name="selectItem" /> 风衣 <br/>
<input type="checkbox" name="selectItem" /> 手套 <br/>
<input type="checkbox" name="selectItem" /> 帽子 <br/>
</body>
</html>