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');
            }

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

  • 相关阅读:
    Eletron 打开文件夹,截图
    nodejs 与 json
    drupal sql 源码解析query.inc 文件
    The maximum column size is 767 bytes (Mysql)
    php 过滤emoji
    Mysql delete操作
    Mysql update 一个表中自己的数据
    form 表单排序
    jquery parents用法
    MYSQL数据库重点:流程控制语句
  • 原文地址:https://www.cnblogs.com/guohu/p/4666736.html
Copyright © 2011-2022 走看看