<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script src="js/test.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<button>按钮</button>
<button οnclick="func1()">跳转到红页面</button>
<button οnclick="func2()">关闭窗体</button>
</body>
</html>
==============================
function func1(){
window.open("red.html","blank","width=200px,height=400px,left=20px,top=0")
}
function func2(){
window.close();
}