<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
</head>

<form>
    <input type="button" name="Button1" value="CN-Bruce" onclick="WinOpen()" />

<button onclick="window.open('http://www.aspxhome', '', 'width=800,height=300')">open1</button>

<button onclick="var newwin = window.open('http://www.aspxhome', '', 'width=800,height=300'); newwin.moveTo(50, 50), newwin.resizeTo(800, 300)">open2</button>
    <button onclick="window.showModelessDialog('http://www.aspxhome', '', 'dialogWidth:800px;dialogHeight:300px')">open3</button>
    <a href="#" onclick="window.open('http://www.aspxhome','target','param')">a11</a>
</form>
<body>
</body>
</html>

<!--window.open 参考文档:http://www.cnblogs.com/mfryf/archive/2013/06/10/3130286.html-->

<script language="JavaScript">

function WinOpen() {
        //得到页面高度
        var yScroll = (document.documentElement.scrollHeight > document.documentElement.clientHeight) ? document.documentElement.scrollHeight : document.documentElement.clientHeight;

//self.resizeBy = yScroll;
        //得到页面宽度
        var xScroll = (document.documentElement.scrollWidth > document.documentElement.clientWidth) ? document.documentElement.scrollWidth : document.documentElement.scrollWidth;

//self.resizeTo(xScroll - 200, yScroll - 200);

//self.moveTo(xScroll - 200, yScroll - 200);
        var x = xScroll - 200;
        var y = yScroll - 100;

//mesg = open("http://www.aspxhome", "DisplayWindow", "toolbar=no,,menubar=no,location=no,scrollbars=no");
        //mesg.document.write("<HEAD><TITLE>中国asp之家</TITLE></HEAD>");
        //mesg.document.write("<CENTER>http://www.aspxhome</CENTER>");
        //window.open('http://www.aspxhome', '', 'width="' + x + 'px",height="' + y + '"px');

var featrures = "toolbar=no,menubar=no,location=no,scrollbars=yes,";
        var newwin = window.open('http://www.aspxhome', 'target', featrures);
        newwin.resizable = "yes";
        newwin.moveTo(100, 10);
        newwin.moveBy(100, 80);
        
        top = 200
        //       newwin.resizeTo(x, y);
    }
    //得到页面高度
    var yScroll = (document.documentElement.scrollHeight > document.documentElement.clientHeight) ? document.documentElement.scrollHeight : document.documentElement.clientHeight;

//self.resizeBy = yScroll;
    //得到页面宽度
    var xScroll = (document.documentElement.scrollWidth > document.documentElement.clientWidth) ? document.documentElement.scrollWidth : document.documentElement.scrollWidth;

//self.resizeTo(xScroll - 200, yScroll - 200);

//self.moveTo(xScroll - 200, yScroll - 200);

</script>

js window.open 打开新窗体 参数设置的更多相关文章

  1. window.open打开新窗口 参数

    1,基本描述 oNewWindow = window.open( sURL , sName , sFeatures, bReplace) window.open在打开一个窗口(其url为sURL)后, ...

  2. window.open打开新窗体并用post方式传参

    function openPostWindow(url,data,name){ //url要跳转到的页面,data要传递的数据,name显示方式(可能任意命名) var tempForm = docu ...

  3. Response.Redirect 打开新窗体的两种方法

    普通情况下,Response.Redirect 方法是在server端进行转向,因此,除非使用 Response.Write("<script>window.location=' ...

  4. window.open()打开新窗口教程

    使用 window 对象的 open() 方法可以打开一个新窗口.用法如下: window.open (URL, name, features, replace) 参数列表如下: URL:可选字符串, ...

  5. ajax回调打开新窗体防止浏览器拦截有效方法

    ajax回调打开新窗体防止浏览器拦截,就这么做! 问题剖析:   1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 function click_fun(){    window ...

  6. ajax请求响应中用window.open打开新窗口会被浏览器拦截的解决方式

    一.问题描述 ajax 异步请求成功后需要新开窗口打开 url,使用的是 window.open() 方法,但是会被浏览器给拦截了,需要用户点下. 二.问题分析 浏览器之所以拦截新开窗口是因为该操作并 ...

  7. Window.open()打开一个窗体不被拦截

    Window.open()打开一个窗体不被拦截     在DataGrid中建一个模板列,在模板列中放一个客户端的Button,或者直接写你要的字句,然后用<a href>连接例:< ...

  8. 几个主流浏览器 Window.open打开新窗口 、模拟a标签打开新窗口的 表现

    Window.open打开新窗口 1.常用浏览器打开新窗口(正常打开window.open)的的不同表现形式(PC/移动端) 2.Window.open在异步处理中打开(_blank) a标签在异步处 ...

  9. window.open()打开新窗口 及参数

    在jsp页面中需要使用到弹出窗口,想到js的window对象有一个open方法可以弹出窗口,于是对open方法进行记录. 首先是open方法的语法及定义: 定义: open() 方法用于打开一个新的浏 ...

随机推荐

  1. C与CPP 在线手册查找

    1. MSDN 的标准与使用 https://msdn.microsoft.com/zh-cn/library/3bstk3k5.aspx 2. Cpp在线查看. http://www.cpluspl ...

  2. C#手工注入辅助工具

    看了某牛出版的MySql手注天书一神书,基本上解决了SQL注入上的知识点,于是打完(酱油)省赛回来通宵了一晚上写了个工具 方便语句构造SQL 联合查询 报错注入 盲注 读写 命令执行 基本都有整合 遇 ...

  3. docker中如何制作自己的基础镜像

    一.本地镜像 举个例子:现在把自己的开发环境打包,取名为centos6-base.tar,然后在docker中,以centos6-base.tar作为基准镜像. 1.创建自己的镜像,放置于/root目 ...

  4. mac: vmware fusion中cent os启动假死的解决办法

    环境: mac os X 10.9.2 + vmware 6.0.2 + cent OS 6.5 minimal 现象: Booting CentOS (2.6.32-358.e.l6.i686) i ...

  5. java:读/写配置文件

    package jimmy; import java.io.*; import java.util.Properties; public class Program { public static v ...

  6. Logging的这点小事

    真正做项目,才发觉Logging的好处和学问.自己胡搞的时候,常常使用System.out.println作为输出. 但实际的项目,尤其是library比较多的时候,好好配置好Logging,才能在后 ...

  7. Oracle中序列(SEQUENCE)的使用一例

    曾经在触发器中使用序列(SEQUENCE): create or replace trigger TRI_SUPPLIER before insert on SUPPLIER for each row ...

  8. 东大OJ-1040-Count-快速幂方法求解斐波那契-

    Many ACM team name may be very funny,such as "Complier_Error","VVVVV".Oh,wait fo ...

  9. mysql 定义自增

    The database returned no natively generated identity value问题 alter table user_table MODIFY user_id I ...

  10. PHP -- 上传文件接口编写 及 iOS -- 端上传图片AF实现

    PHP 上传文件接口: //保存图片 $json_result ['status'] = 0; $path = 'upfile'; $json_result ['status'] = 0; $json ...