//window.showModalDialog全屏显示
function winModalFullScreen(strURL)
{
var sheight = screen.height-70;
var swidth = screen.width-10;
var winoption ="dialogHeight:"+sheight+"px;dialogWidth:"+ swidth
+"px;status:yes;scroll:yes;resizable:yes;center:yes";
var tmp=window.showModalDialog(strURL,window,winoption);
return tmp;
}
//window.open全屏显示
function winOpenFullScreen(strURL)
{
var sheight = screen.height-70;
var swidth = screen.width-10;
var winoption ="left=0,top=0,height="+sheight+",width="+swidth
+",toolbar=yes,menubar=yes,location=yes,status=yes,scrollbars=yes,resizable=yes";
var tmp=window.open(strURL,'',winoption);
return tmp;
}
1. dialogHeight: 对话框高度,不小于100px
2. dialogWidth: 对话框宽度。
3. dialogLeft: 离屏幕左的距离。
4. dialogTop: 离屏幕上的距离。
5. center: { yes | no | 1 | 0 } : 是否居中,默认yes,但仍可以指
定高度和宽度。
6. help: {yes | no | 1 | 0 }: 是否显示帮助按钮,默认yes。
7. resizable: {yes | no | 1 | 0 } [IE5+]: 是否可被改变大小。默认no。
8. status: {yes | no | 1 | 0 } [IE5+]: 是否显示状态栏。默认为yes[
Modeless]或no[Modal]。
9. scroll: { yes | no | 1 | 0 | on | off }:是否显示滚动条。默认为yes。
window.open方式父级页面获取子级页面的返回值
function check() {
window.opener.document.getElementById("txtId").value=id;
window.opener.document.getElementById("txtName").value=name;
}
这样,父级页面的document.getElementById("txtId") 和
document.getElementById("txtName") 2个控件就可以得到子级页面的返回值。
相关推荐
window.showModalDialog以及window.open用法简介
NULL 博文链接:https://shawnfree.iteye.com/blog/598885
window.showModalDialog以及window.open用法简介
window.showModalDialog&&open.docx
ShowModalDialog函数的功能: 使用方法: 参数说明:
本文实例讲述了js的window.showModalDialog及window.open用法。分享给大家供大家参考。具体分析如下: 一、window.open()支持环境: JavaScript1.0+/JScript1.0+/Nav2+/IE3+/Opera3+ 二、基本语法: window.open...
今天在项目中用到了弹出子窗口,就想到了用JavaScript实现的两种方法,一个是window.open();一个是window.showModalDialog()方法,后者是存在父子关系的一种弹出窗口,只有子窗关闭,父窗口才激活,并且可以传送参数...
window.showModalDialog()方法用来创建一个显示HTML内容的模态对话框,由于是对话框,因此它并没有一般用window.open()打开的窗口的所有属性。 window.showModelessDialog()方法用来创建一个显示HTML内容的非模态
嗨,Kavita3,它是Chrome浏览器中的一个已知问题,您可以使用window.open();希望对您有用
1> window.showModalDialog()采用JS原理实现,同时父窗口不可操作,window.open()采用新创建一个窗口,同时父窗口可操作; 2> 父窗口与子窗口传递值的方式也有所不同,在子窗口中操作父窗口也语法也不同,分别为var...
showModalDialog和window.open
window.open()和window.showModalDialog(),并解决了showModalDialog()弹出窗口中列表分页的问题。 提供了三个JS方法: (1)showWindow(sURL, width, height); (2)showWindowInPage(pageUrl, params, title, ...
showModalDialog是jswindow对象的一个方法,和window.open一样都是打开一个新的页面。区别是:showModalDialog打开子窗口后,父窗口就不能获取焦点了(也就是无法操作了)。可以在子窗口中通过设置window.return...
程序没有改动过运行一直正常,突然... 代码如下: “[removed]window.showModalDialog(‘Info.aspx?bh=” + Server.UrlEncode(e.Row.Cells.FromKey(“编号”).Text.Trim()) + “‘,null,’dialogWidth:750px;dialogHeig
因为项目中使用showModalDialog函数的地方特别多,所以必须用一个类似方法实现功能,也就是window.open() 首先是判断子窗口关闭,因为项目是在子窗口关闭(确定按钮)的时候向父页面传递值的。
这里介绍了chooseCancelOnNextConfirmation、chooseOkOnNextConfirmation等JavaScript脚本实现的弹出窗口处理函数,selenium会弹出网页窗口,因为它重写了window.open在文件selenium-browserbot.js函数BrowserBot....