zoukankan      html  css  js  c++  java
  • js弹出窗口

        function openModalDialog(url, height, width) {
                var t_height = 400;
                var t_width = 600;
                if (!isNaN(height)) {
                    t_height = height;
                }
                if (!isNaN(width)) {
                    t_width = width;
                }
                showModalDialog(url, 'newwindow',
                       'dialogWidth:' + t_width + 'px;dialogHeight:' + t_height + 'px;center:yes;help:yes;resizable:no;status:no')
            }
    
            function openModelessDialog(url, height, width) {
                var t_height = 400;
                var t_width = 600;
                if (!isNaN(height)) {
                    t_height = height;
                }
                if (!isNaN(width)) {
                    t_width = width;
                }
                showModelessDialog(url, 'newwindow',
                   'dialogWidth:' + t_width + 'px;dialogHeight:' + t_height + 'px;center:yes;help:yes;resizable:no;status:no')
            }
    
            function openWindow(url, height, width) {
                var t_height = 400;
                var t_width = 600;
                if (!isNaN(height)) {
                    t_height = height;
                }
                if (!isNaN(width)) {
                    t_width = width;
                }
                var left = (window.screen.width - t_width) / 2;
                var top = (window.screen.height - t_height) / 2;
                window.open(url, 'newwindow',
                  'resizable=no,height=' + t_height + ',width=' + t_width + ',top=' + top + ',left=' + left + ',titlebar=no ,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');
            }

     程序员的基础教程:菜鸟程序员

  • 相关阅读:
    计划任务工具-windows
    [JavaWeb基础] 017.Struts2 和 ajax交互简介
    html5学习之路_007
    [PHP学习教程
    [PHP学习教程
    [注]还原记忆力的真面目
    理解Java对象序列化
    HashTable和HashMap的区别详解
    HDFS NameNode内存全景
    HDFS 原理、架构与特性介绍
  • 原文地址:https://www.cnblogs.com/guohu/p/4666736.html
Copyright © 2011-2022 走看看