如果是target=iframeName的话没有问题的,如果改name的iframe找不到会在新窗口打开的
解决方案 »
- 请教高手,javascript动态创建的文本框如何指定其宽度和高度
- jQuery 弹出模态窗口
- 鼠标按住怎么做???
- 为什么keycode变成不对呢
- 请高人介绍一本讲javascript经典的书,最好是新版的有动态javascript内容的书
- 动态增加下拉框内容,并传递参数为增加内容出现的问题!
- 最后只剩下10分了!帮帮忙,js读取xml文件的问题
- 分不够再加:帮我解决文字编辑器相关东东
- 如何不打印页面上隐藏的控件
- 不用window.open怎么改变一个窗口的外观?
- 请问showModalDialog()函数show出来的页面能交互吗???
- 有一个javascript的问题,请高手指点!谢谢!
</form>
<iframe name = framenaem>
<iframe name = content>
在你要提交的页上加上下面这句话
<base target="content">
<form target="win">
<input type=submit>
</form>
<iframe name="win"></iframe>
<div id='show_text'></div><form name='form1' enctype='multipart/form-data' method='post' action='file_upload.php?dir=logos' target=file_upload_iframe><input type='file' name='img'><br><input type=submit value=下一步><br><img name=show_img src='../../../.././forum/images/system/icons.gif' style='display:none'><br><div id=show_swf style='display:none'></div></form>
<iframe id=file_upload_iframe name=file_upload_iframe style='width:0;height:0'></iframe><script language=javascript>
//读取扩展名
function readEx(s)
{
var s = s.split('\\');
s = s[s.length-1];
s = s.split('.');
s = s[s.length-1];
return s;
}
function show(value)
{
if (document.all.img.value != '') {
var ex = readEx(document.all.img.value)
if (/bmp/i.test(ex) || /jpg/i.test(ex) || /gif/i.test(ex) || /png/i.test(ex)) {
document.all.show_img.src = document.all.img.value;
document.all.show_img.style.display = '';
document.all.show_swf.style.display = 'none';
} else if (/swf/i.test(ex)) {
if (value != document.all.img.value) {
value = document.all.img.value;
value = value.replace(/\\/g, '\\\\');
document.all.show_swf.innerHTML ='<embed id=swf_show src='+document.all.img.value+' height=320 width=240>';
document.all.show_swf.style.display = '';
document.all.show_img.style.display = 'none';
} else {
value = value.replace(/\\/g, '\\\\');
}
} else {
document.all.show_swf.style.display = 'none';
document.all.show_img.style.display = 'none';
}
}
setTimeout('show("'+value+'")', 500);
}
show(document.all.img.value);
</script><script>window.open(self.location);</script>
弹出新窗口.
请问如何解决.
http://expert.csdn.net/Expert/topic/1948/1948696.xml?temp=.4253046
谢谢了。。
<script>
function checkform()
{
url = "file_upload.php?dir=logos&xx=xx&xx=xx";
showModalDialog(url,window,'dialogwidth=;dialogheight=');
window.close();
}
</script>
<form name='form1' enctype='multipart/form-data' method='post' onsubmit=checkform()>