关闭窗口:window.close() 只能用于Js打开的窗口
var w=window.open("http://sina.com","_blank")
w为新窗口的引用
若打开的窗口与新窗口不在同一域名下,w.document拒绝访问
若在同一域名下,则可访问新窗口的document对象
例:(同一域名下)
var w=window.open("father.html","_blank");
father.html中: window.opener.document.title="改变父窗口"
对话框:
alert(str) -------弹出框 有一个确定按钮
confirm(str)-----确认框 有确定和取消按钮,点确定返回true,点取消返回false
prompt(str,defalutValue) 用户输入对话框 第二个参数若没有一般写 ""
状态栏:
window.status
window.defaultStatus