<html>
<head>
<script type="text/javascript">
function openwindow(){
window.status="系统当前状态,您正在注册用户……";
if(window.screen.width==1366&&window.screen.height==768){
open("register.html","注册窗口","toolbar=0,location=1,status=0,menubar=0,width=700,height=550,scrollbars=1");
}
else{
window.alert("请设置分辨率为1366×768,然后再打开");
}
}
function closewindow(){
if(window.confirm("确认要退出吗?")){
window.close();
}
}
</script>
</head>
<body>
<form>
<input type="button" name="regButton" value="用户注册" οnclick="openwindow()"/>
<input type="button" name="exsistButton" value="关闭" οnclick="closewindow()"/>
</form>
</body>
</html>
注:也可将这里的两个按钮改成超链接形式
<A href="javascript:openwindow( )"/>注册用户</A>
<A href="javascript:closewindow( )"/>关闭</A>