一 window对象 window 对象表示一个浏览器窗口. 在客户端 JavaScript 中,Window 对象是全局对象,所有的表达式都在当前的环境中计算.也就是说,要引用当前窗口根本不需要特殊的语法 ,可以把那个窗口的属性作为全局变量来使用.例如,可以只写 document,而不必写 window.document 同样,可以把当前窗口对象的方法当作函数来使用,如只写 alert(),而不必写 Wi ndow.alert(). 关键函数的案例使用: alert() 显示带有一段消息和一个