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的更多相关文章

  1. wordpress在window下完美实现301重定向的方法

    问题: 首先,简单说一下关于301重定向的问题,最简单的理解就是,假设你的主机上绑定有 www.uilike.cn, uilike.cn, www.uiseo.cn三个域名,当你想输入 uilike. ...

  2. window.location.Reload()和window.location.href 区别

    首先介绍两个方法的语法: reload 方法,该方法强迫浏览器刷新当前页面.语法:location.reload([bForceGet])参数: bForceGet, 可选参数, 默认为 false, ...

  3. window.location.href 和 window.location.replace 的区别

    window.location.href  和  window.location.replace 的区别 1.window.location.href=“url”:改变url地址: 2.window. ...

  4. 详解;(function ($,window,document,undefined){...})(jQuery,window,document);

    1.代码最前面的分号,可以防止多个文件压缩合并以为其他文件最后一行语句没加分号,而引起合并后语法错误. 2.匿名函数(function(){})();:由于Javascript执行表达式是从圆括号里面 ...

  5. window.location.href和window.open的几种用法和区别

    使用js的同学一定知道js的location.href的作用是什么,但是在js中关于location.href的用法究竟有哪几种,究竟有哪些区别,估计很多人都不知道了. 一.location.href ...

  6. 拉动滚动条追加内容,无限延伸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 ...

  7. 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 ...

  8. window.open open new window?

    when ever i use window.location.href=//some url it always open a new window, this only happens when ...

  9. javascript:window.location.replace 与 window.location.reload() 刷新页面的不同效果

    今天早上我发现一个问题,当一个网页的地址最后面是一个#时(比如:http://www.baidu.com/go.asp#), 执行:window.location.replace(window.loc ...

随机推荐

  1. 3-java_string学习笔记:

    java中String的常用方法

  2. DSOframer 的简单介绍和资源整理(2015-09-02重新整理)

    DSOframer 是微软提供一款开源的用于在线编辑 Word. Excel .PowerPoint 的 ActiveX 控件.国内很多著名的 OA 中间件,电子印章,签名留痕等大多数是依此改进而来的 ...

  3. mybatis框架入门程序:演示通过mybatis实现数据库的插入操作中实现返回结果的获取

    1.mybatis实现数据库的插入操作可以查看https://www.cnblogs.com/wyhluckdog/p/10149895.html这篇博文,这里面的插入操作没有返回结果,所以这篇博文就 ...

  4. Mybatis的select查询的三种方式

    1.首先建立一个测试的dao public interface IStudentDao { // 根据姓名查询 List<Student> selectStudentsByName(Str ...

  5. .bat文件打开指定网页,并运行jar包

    @echo off Start "" "C:\Users\Lenovo\AppData\Local\Google\Chrome\Application\chrome.ex ...

  6. swoole1.8.0+版本异步redis安装(本实例为swoole1.8.10版本)详解

    Swoole-1.8.0+版本增加了对异步Redis客户端的支持,基于redis官方提供的hiredis库实现.Swoole提供了__call魔术方法,来映射绝大部分Redis指令(本次安装实例为sw ...

  7. python之使用API(WEB应用编程接口)

    1.处理API响应 import requests #执行API调用并存储响应 url = "https://api.github.com/search/repositories?q=lan ...

  8. Google Tango SDK下载

    Tango SDK files谷歌Tango开发包 The Tango SDK is under active development; please keep this in mind as you ...

  9. [label][paypal] Paypal 支付页面的语言显示问题

    答复 Frank 通过 Email2014-11-12 02:01 上午 您好 感谢您联系PayPal商家技术支持中心. PayPal登陆页面的语言是PayPal服务器根据以下各种因素来自动判断的:1 ...

  10. ARPG游戏打击感相关的技术简单总结

    说好的技术总结,根据近期的工作总结一下体现游戏打击感相关的技术.一般arpg的游戏打击感除了场景的氛围的烘托,策划的数值:连击,奖励伤害数字的连贯积累反馈,硬直加物理击飞ragdoll,更不可忽视的也 ...