turnToMain.jsp 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <%@page language="java" pageEncoding="UTF-8"%>
  2. <%@include file="/commons/include/html_doctype.html"%>
  3. <html>
  4. <head>
  5. <script language="javascript">
  6. function init(){
  7. openScreenWin();
  8. closewin();
  9. }
  10. function openScreenWin(){
  11. var url = '${pageContext.request.contextPath}/platform/console/main.ht';
  12. var newwin = window.open(url,"","left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight+",toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes"); //第三个参数 加上fullscreen=yes 时页面会全屏打开,在IE10上页面上的标题栏会隐藏掉,所以不建议用全屏; 第二个参数(名称不能填写,否则当你在页面重新登录并关闭跳转页面时会按名称去关闭窗口的)
  13. if(newwin == null){
  14. alert("您的浏览器禁止了弹出窗口!请更改浏览器拦截弹出窗口的设置,才能正常访问该系统...");
  15. }
  16. /* if (document.all){
  17. newwin.moveTo(0,0);
  18. newwin.resizeTo(screen.availWidth,screen.availHeight);
  19. } */
  20. }
  21. function closewin(){
  22. var type="";
  23. var ua=navigator.userAgent.toLowerCase();
  24. if(ua.indexOf("msie")>=0){
  25. type="MSIE";
  26. if(navigator.Actual_Version=="6.0"){
  27. type+="6";
  28. }
  29. }else if(ua.indexOf("firefox")>=0){
  30. type="Firefox";
  31. }else if(ua.indexOf("chrome")>=0){
  32. type="Chrome";
  33. }else if(ua.indexOf("opera")>=0){
  34. type="Opera";
  35. }else if (ua.indexOf("netscape")>=0){
  36. type="Netscape";
  37. }else{
  38. type="other";
  39. }
  40. if(type=="MSIE6"){
  41. window.opener=null;
  42. window.close();
  43. }else if(type=="MSIE"){
  44. window.opener=null;
  45. window.open('','_self','');
  46. window.close();
  47. }else if(type=="Firefox"){
  48. window.location.href = 'about:blank'; //清空跳转页面 不是用OPEN打开的窗口在火狐默认是没有 window.close(); 所以把首页置空白
  49. window.open('','_parent','');
  50. window.close();
  51. }else if(type=="Chrome"){
  52. window.open('','_self','');
  53. window.close();
  54. }else if(type=="Opera"){
  55. window.location.href = 'about:blank'; //清空跳转页面 不是用OPEN打开的窗口在Opera默认是没有 window.close(); 所以把首页置空白
  56. window.open('','_parent','');
  57. window.close();
  58. }else if(type=="Netscape"){
  59. window.location.href = 'about:blank';
  60. window.open('','_self','');
  61. window.close();
  62. }else{
  63. window.location.href = 'about:blank';
  64. window.opener=null;
  65. window.open('','_parent','');
  66. window.close();
  67. window.open('','_self','');
  68. window.close();
  69. }
  70. }
  71. </script>
  72. </head>
  73. <body onload="javascript:init();">
  74. 跳转借助页面,请关闭......
  75. </body>
  76. </html>