window.open完美替代window.showModalDialog
var url = "http//:www.baidu.com/"
var name = "百度";
var iWidth = 1100;//弹窗宽度
var iHeight = 700; //弹窗高度
var iTop = (window.screen.availHeight - 30 - iHeight) / 2;
var iLeft = (window.screen.availWidth - 10 - iWidth) / 2;
window.open(url, name, 'height=' + iHeight + ',innerHeight=' + iHeight + ',width=' + iWidth + ',innerWidth=' + iWidth + ',
top=' + iTop + ',left='+ iLeft + ',toolbar=no,menubar=no,scrollbars=yes,resizeable=no,location=no,status=no');
window.open完美替代window.showModalDialog的更多相关文章
- wordpress在window下完美实现301重定向的方法
问题: 首先,简单说一下关于301重定向的问题,最简单的理解就是,假设你的主机上绑定有 www.uilike.cn, uilike.cn, www.uiseo.cn三个域名,当你想输入 uilike. ...
- window.location.Reload()和window.location.href 区别
首先介绍两个方法的语法: reload 方法,该方法强迫浏览器刷新当前页面.语法:location.reload([bForceGet])参数: bForceGet, 可选参数, 默认为 false, ...
- window.location.href 和 window.location.replace 的区别
window.location.href 和 window.location.replace 的区别 1.window.location.href=“url”:改变url地址: 2.window. ...
- 详解;(function ($,window,document,undefined){...})(jQuery,window,document);
1.代码最前面的分号,可以防止多个文件压缩合并以为其他文件最后一行语句没加分号,而引起合并后语法错误. 2.匿名函数(function(){})();:由于Javascript执行表达式是从圆括号里面 ...
- window.location.href和window.open的几种用法和区别
使用js的同学一定知道js的location.href的作用是什么,但是在js中关于location.href的用法究竟有哪几种,究竟有哪些区别,估计很多人都不知道了. 一.location.href ...
- 拉动滚动条追加内容,无限延伸document高度 $(window).scroll(function(){if($(window).scrollTop() + $(window).height() == $(document).height()) { $("body").append(html) } })
$(document).ready(function() { // endless scrolling $(window).scroll(function() { if($(window).scrol ...
- Pass value from child popup window to parent page window using JavaScript--reference
Here Mudassar Ahmed Khan has explained how to pass value from child popup window to parent page wind ...
- window.open open new window?
when ever i use window.location.href=//some url it always open a new window, this only happens when ...
- javascript:window.location.replace 与 window.location.reload() 刷新页面的不同效果
今天早上我发现一个问题,当一个网页的地址最后面是一个#时(比如:http://www.baidu.com/go.asp#), 执行:window.location.replace(window.loc ...
随机推荐
- 3-java_string学习笔记:
java中String的常用方法
- 二叉树中和为某一值的路径 (java)
问题描述 输入一颗二叉树和一个整数,打印出二叉树中结点值的和为输入整数的所有路径.路径定义为从树的根结点开始往下一直到叶结点所经过的结点形成一条路径. 题解 import java.util.Arra ...
- Luogu 4433 [COCI2009-2010#1] ALADIN
LOJ 2958 线段树 + 类欧 主要矛盾就是$\sum\limits_{i = l}^{r}Ai \mod B$怎么做. 拆成前缀和相减的形式,有 $$\sum_{i = 0}^{r}(Ai \m ...
- mysql新建用户并授权
参考:https://www.cnblogs.com/zhangdiIT/p/8116776.html
- Win10正式版怎么关闭windows defender
分步阅读 如何关闭Win10正式版系统所自带的"Windows Defender"程序呢?"Windows Defender"程序是Win10正式版系统所自带的 ...
- Python中ndarray数组切片问题a[-n -x:-y]
先看看如下代码: >>a=np.arange(10)>>a array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])>>a[-7:] array( ...
- 共享keychain数据
[共享keychain数据] 当往keychain中插入数据时,默认的 kSecAttrAccessGroup 就是App自身的BundleID. [官方文档] You can add a keych ...
- Mac之如何查看已用端口
一.苹果自带的网络分析工具查看方法: OS X 10.9 下面 网络实用工具 从实用工具目录里消失了,可能苹果认为这个程序用的人太少就取消了吧.但是对于做互联网的人还是有点用的. 启动方法 ...
- git pull --rebase的使用
原文:http://www.cnblogs.com/kevingrace/p/5896706.html 使用下面的关系区别这两个操作:git pull = git fetch + git mergeg ...
- jquery.fn.extend() 与 $.jquery 作用及区别
原文:http://www.cnblogs.com/liu-l/p/3928373.html jQuery.extend()这个方法,主要是用来拓展个全局函数啦,例如$.ajax()这种,要不就是拓展 ...