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');
}
程序员的基础教程:菜鸟程序员
js弹出窗口的更多相关文章
- js弹出窗口总结6种弹窗方法
注: //关闭,父窗口弹出对话框,子窗口直接关闭 this.Response.Write("<script language=javascript>window.close(); ...
- JS弹出窗口代码大全(详细整理)
1.弹启一个全屏窗口 复制代码代码如下: <html> <body http://www.jb51.net','脚本之家','fullscreen');">; < ...
- js弹出窗口的学习和使用
Thickbox Thickbox是基于Jquery的,因此使用Thickbox需要下面四个文件: Thickbox.js----Thickbox主文件 CSS文件----Thickbox.css 最 ...
- 最完美解决方案:js弹出窗口关闭当前页面,而不弹出提示框
该功能主要用于业务系统中的登录操作,登录后弹出全屏的业务系统主界面,而不需要工具栏.地址栏.菜单等功能. 之前针对不同浏览器找了无数种方法,包括网上能查到的所有方法,弹出的结果都不理想.结果有的IE6 ...
- js 弹出窗口 防止拦截,突破阻止,保存后打开
<script language="javascript"> function orderprint() { var formUrl = "savedata_ ...
- [转]js来弹出窗口的详细说明
1.警告对话框 <script> alert("警告文字") </script> 2.确认对话框 <script> confirm(" ...
- jquery-通过js编写弹出窗口
本文转载 本文主要是通过js动态控制div的高度,css控制浮动 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional// ...
- 原生Js封装的弹出框-弹出窗口-页面居中-多状态可选
原生Js封装的弹出框-弹出窗口-页面居中-多状态可选 实现了一下功能: 1.title可自定义 可拖拽 2.width height可以自定义 3.背景遮罩和透明度可以自定义 4.可以自己编辑弹出 ...
- 原生JS实现弹出窗口的拖拽
上一篇说了一下弹出窗口功能的实现思路,一般情况下紧接着就会需要做到弹窗的移动,当然现在有很插件.库比如hammer可以使用,效率也非常好.但我觉得还是有必要了解一下原生JS的实现思路及方式,如下: 思 ...
随机推荐
- xcode加载静态链接库.a文件总是失败
明明项目是对的,代码没有问题,并且把项目作为库项目引入到新项目中没问题,可是一旦把项目编译出.a文件,引入到新项目中不知为何会有几率出现一大堆错误,其实是xcode的缓存机制在作怪,去这个目录: /U ...
- centos下配置dns,gateway,ip
centos网络配置实例 1,配置DNS vi /etc/resolv.conf 加入: 代码如下: nameserver 192.168.0.1 nameserver 8.8.8.8 names ...
- BufferedInputStream与BufferedOutputStream
BufferedInputStream是带缓冲区的输入流,默认缓冲区大小是8M,能够减少访问磁盘的次数,提高文件读取性能:BufferedOutputStream是带缓冲区的输出流,能够提高文件的写入 ...
- 第15篇 PSR-04 规范
1. Overview This PSR describes a specification for autoloading classes from file paths. It is fully ...
- linux下安装ZipArchive扩展和libzip扩展
在项目开发的时候,由于要下载多个录音文件,我就需要打包下载这个功能 学习源头: https://www.landui.com/help/show-8079 https://www.aliyun.com ...
- H5浏览器播放RTMP直播流
<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Inse ...
- Python if-elif-else
alien_color = ['green','yellow','red']for color in alien_color: if color == 'green': print 'alien_co ...
- TCP之一:传输控制协议(Transmission Control Protocol, TCP)
TCP协议主为了在主机间实现高可靠性的包交换传输协议.本文将描述协议标准和实现的一些方法.因为计算机网络在现代社会中已经是不可缺少的了,TCP协议主要在网络不可靠的时候完成通信,对军方可能特别有用,但 ...
- Spring启动后获取所有拥有特定注解的Bean,注解的属性值
最近项目中遇到一个业务场景,就是在Spring容器启动后获取所有的Bean中实现了一个特定接口的对象,第一个想到的是ApplicationContextAware,在setApplicationCon ...
- PHP面向对象深入研究之【命名空间】与【自动加载类】
命名空间 避免类名重复,而产生错误. <?php require_once "useful/Outputter.php"; class Outputter { // outp ...