JS window对象指定大小页面
2015-09-21 17:09
507 查看
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <script language="javascript"> function openwindow(){ if(window.screen.width == 1024 && window.screen.height == 768){ open("register.html","注册窗口","toolbars = 0,location=0,statusbars=0,menubars=0,width=700,height=550,scrollbars=1"); } else{ window.alert("请设置分辨率为1024X768,然后再打开"); } } function closewindow(){ if(window.confirm("您确认要退出系统吗?")) window.close(); } </script> <style type="text/css"> body{backgroud-color:#cccccc;} </style> </head> <body> <table border="0" align="center" bgcolor="#ffffff"> <tr> <td><input type="button" name="regButton" value="进入" onClick="openwindow()"> <input type="button" name="exitButton" value="退出" onClick="closewindow()"></td> </tr> </table> </body> </html>
相关文章推荐
- JavaScript之function类型
- javascript 方法 prototype属性
- 高性能JavaScript模板引擎原理解析
- 高性能JavaScript模板引擎原理解析
- 高性能JavaScript模板引擎原理解析
- 高性能JavaScript模板引擎原理解析
- javascript 基础知识-1
- JS window对象默认窗口
- 判断JS对象是否拥有某属性
- 判断JS对象是否拥有某属性
- 判断JS对象是否拥有某属性
- js 数组sort()
- javascript中的prototype和constructor
- JSP中的session超时手动设置
- 回流与重绘:CSS性能让JavaScript变慢?
- Javascript高性能动画与页面渲染
- EXTJS入门教程及其框架搭建
- ExtJs自学教程(2):从DOM看EXTJS
- JavaScript之RegExp
- ExtJs自学教程(1):一切从API开始