在showModalDialog打开的画面中提交form时,不想打开新窗口的解决方法
2016-01-14 15:47
393 查看
打开一个模态窗口:
window.showModalDialog(url,window,"dialogWidth:950px; dialogHeight:450px; help: no; status: no");
模态窗口如果提交form,会弹出一个新窗口,即使为form指定了 target="_self" 也是不行的。
那么要如何解决呢?
其实很简单,加上以下代码:
<script type="text/javascript">
window.name = "curWindow";
</script>
对应的form添加target:
<form name="myForm" id="myForm" action="" method="post" target="curWindow">
转自:http://www.360doc.com/content/11/0223/17/4154133_95474400.shtml
window.showModalDialog(url,window,"dialogWidth:950px; dialogHeight:450px; help: no; status: no");
模态窗口如果提交form,会弹出一个新窗口,即使为form指定了 target="_self" 也是不行的。
那么要如何解决呢?
其实很简单,加上以下代码:
<script type="text/javascript">
window.name = "curWindow";
</script>
对应的form添加target:
<form name="myForm" id="myForm" action="" method="post" target="curWindow">
转自:http://www.360doc.com/content/11/0223/17/4154133_95474400.shtml
相关文章推荐
- iOS 星星评价视图 3行搞定
- Gitlab服务器搭建
- shell编程-概述
- Qt编译增加FLAG
- 致力于提高程序员的幸福感 updating
- GSON使用
- Unity3D ParticleSystem粒子系统(3.5版
- SQL SERVER 将行转成列值
- 解决MySQL主从复制不一致的情况
- Spring中使用Interceptor拦截器拦截请求
- 【转载】vector 用法总结
- Android UI基础之GrideView的使用
- iOS 隐藏导航栏或状态栏
- 11G GI deinstall RAC01 and RAC02
- iOS 下获取设备的网络IP
- 什么是baseline?release和build
- Eclipse背景主题设置
- Ubuntu firefox播放视频没有声音
- 【转】解除svn版本控制
- 适配iPad的操作表sheet