模态对话框中进行提交,提交后,在原来的模态对话框打开新的页面。 http://www.csdn.net/Develop/read_article.asp?id=15113 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 showModalDialog提交的问题,如何让其不出现新页面!!!http://expert.csdn.net/Expert/topic/781/781508.xml?temp=.7678644 var sFeatures ="dialogHeight:300px;dialogWidth:500px;dialogTop:250px;dialogLeft:250px;help:no;status:no;scroll:no;dialogHide:1" var returnValue = window.showModalDialog("/dialog.htm","",sFeatures) ; dialog.htm:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>系统登录</title></head></script><body bgcolor="#e9e5d9" topmargin=3><IFRAME frameBorder=0 name=winshow2 target="_self" height="100%" src="timeout.htm" width=100%></IFRAME></body></html>timeout.htm含表单文件<html><head></head><body><form method="POST" action="timeout.jsp"> <input type="text" name="T1" size="20"><input type="submit" value="提交" name="B1"><input type="reset" value="重置" name="B2"></p></form></body></html> 上面这个办法 真正打开的是timeout.htm ,并且 使 在timeout.htm操作后产生的页面替换了timeout.htm 。我就是这个意思,但它用到了dialog .htm,用它来过渡, 但是我有很多象timeout.htm 一样要求显示的页面,那我不就要用到很多对应的过渡表吗,那不是太浪费了,有没有更好的办法。 模态对话框可以提交给自己, 不过不要用iframe,用frame,我就是这样做的,把一个frame隐藏掉,另外一个提交的时候把taget="_self",就行了例frame.html<frameset rows="0,*"> <frame src="about:blank" frameborder="0" noresize width="0" height="0" style="display: none;"> <frame src="AddCard.html" frameborder="0"></frameset>AddCard.html...<form action="frame.dll" method="post" target="_self" name="fr_card" id="fr_card" onsubmit="return check()" enctype="multipart/form-data">...提交后的页面也在对话框中出现 1 为什么不要用iframe,2 你说的方法也用了frame.html作为过渡不是直接用AddCard.html 借qiudehuo(段云霄) 的例子,注意改变的地方timeout.htm含表单文件<html><head><script>name = "mywin"; // 给窗口命名</script></head><body><form method="POST" action="timeout.jsp" target="mywin"> <input type="text" name="T1" size="20"><input type="submit" value="提交" name="B1"><input type="reset" value="重置" name="B2"></p></form></body></html> 漏了一点,打开模态窗口用var returnValue = window.showModalDialog("timeout.htm","",sFeatures) ; 关于select的 options无法取值 live()的问题 请给这个一个动画 如何修改样式 这中样式该如何布局 指定document.body.contentEditable=true;后,按回车换行怎么用的是<p>? 大家帮我看看这个图片的地址src应该怎么写 如何在浏览器客户端上载一个文件,传送到SERVER数据库? 交换图片点击后不再置换的问题 我想在a.js文件中再引入b.js文件的内容 一个关于自定义对象的问题 怎么用javascript函数来让两个不同的层轮流显示? 请各位仁兄帮帮忙,兄弟我都快急死了,不知道该怎么做????
http://expert.csdn.net/Expert/topic/781/781508.xml?temp=.7678644
var returnValue = window.showModalDialog("/dialog.htm","",sFeatures) ;
dialog.htm:<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>系统登录</title>
</head></script>
<body bgcolor="#e9e5d9" topmargin=3>
<IFRAME frameBorder=0 name=winshow2 target="_self" height="100%" src="timeout.htm" width=100%></IFRAME>
</body>
</html>timeout.htm
含表单文件<html><head>
</head><body><form method="POST" action="timeout.jsp">
<input type="text" name="T1" size="20"><input type="submit" value="提交" name="B1"><input type="reset" value="重置" name="B2"></p>
</form></body></html>
例
frame.html<frameset rows="0,*">
<frame src="about:blank" frameborder="0" noresize width="0" height="0" style="display: none;">
<frame src="AddCard.html" frameborder="0">
</frameset>AddCard.html
...
<form action="frame.dll" method="post" target="_self" name="fr_card" id="fr_card" onsubmit="return check()" enctype="multipart/form-data">
...提交后的页面也在对话框中出现
2 你说的方法也用了frame.html作为过渡不是直接用AddCard.html
含表单文件
<html>
<head>
<script>
name = "mywin"; // 给窗口命名
</script>
</head>
<body>
<form method="POST" action="timeout.jsp" target="mywin">
<input type="text" name="T1" size="20"><input type="submit" value="提交" name="B1"><input type="reset" value="重置" name="B2"></p>
</form>
</body>
</html>
var returnValue = window.showModalDialog("timeout.htm","",sFeatures) ;