window
当前窗口
新开窗口
通过本地窗口控制新开窗口
location
获取或设置现有文档的URL
history
先前访问过的URL的历史列表
常用方法 back() go(number)
document
当前的文档对象
document.write() 向客户端浏览器输出内容
documen.formName 可以用这个方法得到表单名称
document.referer
<body>
<script language="JavaScript">
window.status="Hello,Please look here!";
</script>
<form name="ttt">
<input type="button" value="test" onMouseOver="JavaScript:window.status='haha';">
</form>
</body>
<body>
<script language="JavaScript">
window.open("1.html","newWin","toolbar-no,left=200,top=100,menubar=no,width=100,height=100,resizeble=no");
</script>
<form name="ttt">
<input type="button" value="test" onMouseOver="JavaScript:window.status='haha';">
</form>
</body>
<body>
<script language="JavaScript">
var abc = window.open("1.html","newWin","toolbar-no,left=200,top=100,menubar=no,width=100,height=100,resizeble=no");
</script>
<form name="ttt">
<input type="button" value="关闭" onClick="JavaScript:abc.close();">
</form>
</body>
<body>
<script language="JavaScript">
alert(window.location);//URL地址的内容
//alert(document.location);
</script>
</body>
<body>
<script language="JavaScript">
function go2()
{
window.location="33.html";
}
</script>
<input type="button" value="转向" onCLick="JavaScript:go2()">
</body>
<body>
<script language="JavaScript">
function goBack()
{
history.back();
}
</script>
<input type="button" value="返回" onCLick="JavaScript:goBack()">
</body>