window对象,对应window对象而言是浏览器的默认对象,这个对中的所有方法都不用加window,如果:alert,confirm等 //var a = confirm("你好了吗?") 打开一个选择框 //alert(a); //window.alert('可以的'); function change(){ //改变态栏的信息 window.status = '哈哈哈!改变了'; } 使用window.open 可以打开相应的窗口,参数要据帮助文档具体一查询,在打开窗口的面善同可以通过 window.opener来获取父类窗口进行处理。 /* window.open的第一个参数是url,第二个参数名称表示为窗口命名,如果名称一样会把后打开的页面覆盖原有页面 */ <a href='#' onclick ="window.open('test01.html','aa')">text1</a> <a href='#' onclick ="window.open('test02.html','aa')">text1</a> <div id='test'>bbb</div> function setText(){ //window.opener.documnet打开窗口的文档对象 var doc = window.opener.documnet; alert(doc); var hode = doc.getElementById('text'); node.innerText = '你好'; }