<!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. 关于ubuntu的sources.list总结

    一.作用 文件/etc/apt/sources.list是一个普通可编辑的文本文件,保存了ubuntu软件更新的源服务器的地址.和sources.list功能一样的是/etc/apt/sources. ...

  2. SQL/LINQ/Lamda

    SQL LINQ Lambda SELECT * FROM HumanResources.Employee from e in Employees select e Employees   .Sele ...

  3. JVM生产环境参数实例及分析[转]

    java application项目(非web项目) 改进前: -Xms128m-Xmx128m-XX:NewSize=64m-XX:PermSize=64m-XX:+UseConcMarkSweep ...

  4. NodeJS中的静态资源管理服务

    欢迎大家指导与讨论 : ) 一.什么是静态资源 静态资源就是放在服务器中的特定的文件.比较常见的有.css,.png, .js的这一些后缀的文件.下图中的这个html页面便要获取到logo.png和a ...

  5. Dynamics CRM 2016 的新特性

    新版本CRM (2016 with update 0.1) 发布已有几个月了,总结一下新特性,从几个方面来看: 1. 针对整合功能的新特性 (1) 增加了CRM App for Outlook. 这个 ...

  6. 黑暗圣经---物业公司CTO/CEO改如何给老板推荐物业信息化产品

    多年前一次偶然的机会进入到物业信息化行业,在这个过程中认识很多奋战在物业一线的技术大牛.很多时候都会介绍一些朋友给我认识一下,帮我推荐一下我们闻风多奇的物业管理平台.很多朋友看完我们的系统之后都会很开 ...

  7. Linux 信号详解三(sleep,raise)

    sleep()函数 .sleep()函数作用:让进程睡眠 .能被信号打断,然后处理信号函数以后,就不再睡眠,直接向下执行代码 .sleep函数的返回值是剩余秒数 //sleep 函数 #include ...

  8. codevs http://www.codevs.cn/problem/?problemset_id=1 循环、递归、stl复习题

    12.10高一练习题 1.要求: 这周回顾复习的内容是循环.递归.stl. 不要因为题目简单就放弃不做,现在就是练习基础. 2.练习题: (1)循环   题目解析与代码见随笔分类  NOI题库 htt ...

  9. win8.1环境下安装arduino驱动问题解决方案

    1. Windows 键+ R, 输入 shutdown.exe /r /o /f /t 00 2.此时电脑会自动重启,进入一下画面,选择Troubleshoot (转载请注明原处:http://ww ...

  10. Qt学习笔记 ListWidget的增删改

    学习了一下ListWidget控件的使用,做一个小功能增删改 先把代码分解最后给出完整代码 在窗体上添加一个ListWidget 一个Horizontal Specer和  三个PushButton ...