接收window.showModalDialog(url,dialogArgments.features)的返回值
来源:互联网 发布:锐捷当前连接到网络2 编辑:程序博客网 时间:2024/06/08 06:32
若主页面main.jsp,想要获取弹出页面的返回值可以使用window.showModalDialog(url,dialogArgments.features)方法.
其中url路径就是你要弹出的页面如取名:show.jsp,在show.jsp中关闭时触发的方法里写window.returnValue=result;
这里返回的是Array型,id和name
show.jsp提交方法中
//确认
function onOK()...{
var result=new Array;
result[0]=id;
result[1]=name;
window.returnValue=result;
window.close();
}
function onOK()...{
var result=new Array;
result[0]=id;
result[1]=name;
window.returnValue=result;
window.close();
}
其中result就是要返回的值.
main.jsp对应方法中:
function getShowValue()
...{
var result = window.showModalDialog("<%=baseUrl>/show.jsp","show","dialogWidth=380px;dialogHeight=380px; center:yes");
if(result!=null)...{
var id=result[0];
var name=result[1];
}
}
...{
var result = window.showModalDialog("<%=baseUrl>/show.jsp","show","dialogWidth=380px;dialogHeight=380px; center:yes");
if(result!=null)...{
var id=result[0];
var name=result[1];
}
}
其中result就是接收从show.jsp返回的值.这样main.jsp就获得了show.jsp返回的值拉.
就是这样的拉,^_^
- 接收window.showModalDialog(url,dialogArgments.features)的返回值
- window.showModalDialog的返回值
- window.showModalDialog返回值
- 关于window.showModalDialog()返回值的学习心得
- 关于window.showModalDialog()返回值的学习
- 关于window.showModalDialog()返回值的学习心得
- 关于window.showModalDialog()返回值的学习心得
- 关于window.showModalDialog()返回值的学习心得
- 关于window.showModalDialog()返回值的学习
- window.open() 和 window.showModalDialog() 的返回值
- window.showModalDialog()之返回值
- window.showModalDialog()之返回值
- 接收用showModalDialog打开模式窗口返回的值
- window.showModalDialog的传值和返回值
- DOM html window.showModalDialog的传值和返回值
- window.showModalDialog的传值和返回值
- window.showModalDialog的传值和返回值
- 可以返回值的弹出窗口:window.showModalDialog
- PHP 中英文混合排版中处理字符串常用的函数
- 中兴通讯CDMA2000 ALL-IP灵活的组网解决方案
- Linux网络基础
- 关于U盘病毒(又名Autorun病毒)
- SYBASE数据库支持与不支持的子查询语句的归纳总结
- 接收window.showModalDialog(url,dialogArgments.features)的返回值
- struts的LOGIC标签详解
- 一道MSSQL笔试题
- The Most Important C++ Books...Ever
- <img src 在IE6和IE7中的差别
- HTML技巧100例
- ASP.NET程序中常用的三十三种代码
- The Most Important C++ Non-Book Publications...Ever
- 使用Rose2003进行数据库建模