①window.open()
<span style="font-size:14px;"><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script>
window.οnlοad=function(){
var obtn=document.getElementById('btn1');
obtn.οnclick=function(){
window.open('http://www.baidu.com','_blank');
}
}
</script>
</head>
<body>
<input id="btn1" type="button" value="打开"/>
</body>
</html></span>
②document.write()
<span style="font-size:14px;"><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script>
window.οnlοad=function(){
var otxt=document.getElementById('txt1');
var obtn=document.getElementById('btn1');
obtn.οnclick=function(){
var newWin=window.open('about:blank');
newWin.document.write(otxt.value);
};
};
</script>
</head>
<body>
<textarea id="txt1" cols="30" rows="10"></textarea>
<input type="button" id="btn1" value="运行">
</body>
</html></span>
③alert(window.location);//弹出当前文件地址
window.location('http://www.baidu.com');
④alert(window.navigator.userAgent);//弹出浏览器版本
⑤IE:screenLeft screenTop FF:screenX screenY获取浏览器距离屏幕左边距离和上边距离
⑥document.documentElement.clientwidth;(火狐IE通用) FF:window.innerWidth,window.innerHeight获取浏览器宽高
⑦窗体控制:moveBy(X,Y)沿着XY轴移动指定的像素 窗体尺寸:resizeBy(X,Y )