Home  >  Article  >  Web Front-end  >  ie8 iframe无刷新上传问题_html/css_WEB-ITnose

ie8 iframe无刷新上传问题_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 09:07:49980browse

<form method="post" target="formtarget" action="~/clue/insertdata" enctype="multipart/form-data">        <input class="easyui-filebox" name="file" data-options="{buttonText:'选择文件'}"><br/>         <input class="btn"  type="button" value="取消" onclick="" />            <input class="btn" type="submit" value="导入" />        </form><iframe id="formtarget" name="formtarget" style="display:none"></iframe>js代码 var ifm = document.getElementById("formtarget");        if (ifm.attachEvent) {            ifm.attachEvent("onload", function () {                var data = $(window.frames["formtarget"].document).find("pre").text();                if (data != null) {                    insertresult(data);                }            });        } else {            ifm.onload = function () {                var data = $(window.frames["formtarget"].document).find("pre").text();                if (data != null) {                    insertresult(data);                }            };        }

在Google和火狐下上传没问题,但是在ie下会弹出窗口


回复讨论(解决方案)

~/clue/insertdata 设置下Content-Type

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn