有些东西可能很简单,但你就是没用过,不知道怎么用,一下写的就是一个小例子。
暂且有两个界面
a.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<script language="javascript">
function a(obj) {
var arr = new Array();
arr[0]=obj.value;
arr[1]=obj._roomSid;
arr[2]=obj._customerName;
arr[3]=obj._customerMobile;
showModalDialog("b.htm",arr);
}
</script>
<input type="button" value="invoke" onclick="a()"/>
<input type="text" value="1" _roomSid="100" _customerName="孙超1" _customerMobile="13939085647" onclick="a(this)"/><br/>
<input type="text" value="0" _roomSid="101" _customerName="孙超2" _customerMobile="13939085611" onclick="a(this)"/><br/>
<input type="text" value="0" _roomSid="102" _customerName="孙超3" _customerMobile="13939085617" onclick="a(this)"/><br/>
<input type="text" value="0" _roomSid="103" _customerName="孙超4" _customerMobile="13939085627" onclick="a(this)"/><br/>
<input type="text" value="1" _roomSid="104" _customerName="孙超5" _customerMobile="13939085637" onclick="a(this)"/><br/>
</BODY>
</HTML>
b.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY onload="Init()">
<script language="javascript">
function Init() {
var arr = window.dialogArguments;
for (var i=0; i<arr.length;i++ )
{
alert(i+"--"+arr[i]);
}
}
</script>
</BODY>
</HTML>
分享到:
相关推荐
showModalDialog参数详解 基本介绍: showModalDialog() (IE 4+ 支持) showModelessDialog() (IE 5+ 支持) window.showModalDialog()方法用来创建一个显示HTML内容的模态对话框。 window.showModelessDialog()...
showModalDialog参数传递和获
NULL 博文链接:https://qsfwy.iteye.com/blog/587749
使用window.showModalDialog的程序员都知道,该方法可返回值。但是如果遇到跨域时,就返回为underfine。本文档通过iframe镶嵌页面解决该问题。
showModalDialog和showModelessDialog使用心得
This is a `window.showModalDialog()` shim using a modal HTML5 `<dialog>` element and ECMAScript 6 Generators. It was tested in the latest Google Chrome with the *Enable Experimental JavaScript* flag ...
div层实现showModalDialog
主要介绍showModalDialog的用法和参数的传递
Selenium目前没有提供对IE模态对话框(即通过showModalDialog方法打开的弹出对话框)的处理。原因在于,模态对话框会将父页面的 JS挂起,直至对话框处理完毕才会继续执行父页面JS。因为Selenium的底层实现是基于JS的,...
ShowModalDialog函数的功能: 使用方法: 参数说明:
网上找了好几个小时没有找到解决办法。最终还是自己解决了。...这样做就是用超链接把返回url转递到用showModalDialog打开的新窗口中,当showModalDialog返回时指到转来的url,最终不刷新父窗口。......
showModalDialog刷新窗口的例子
解决三层或心上showModalDialog的问题_2
本篇文章主要是对js中showModalDialog参数的使用进行了详细的分析介绍,需要的朋友可以过来参考下,希望对大家有所帮助
window.showModalDialog的基本用法
DIV 实现showModalDialog效果,内加树形效果
javascript代码模块之\Window.ShowModalDialog使用手册
解决三层或心上showModalDialog的问题_js
window.showModalDialog以及window.open用法简介
解决谷歌浏览器37+版本window.showModalDialog方法失效问题,最终版本。 10分你值得拥有