Forms Internet Explorer表单提交,目标为iframe不工作

Forms Internet Explorer表单提交,目标为iframe不工作,forms,internet-explorer,iframe,submit,Forms,Internet Explorer,Iframe,Submit,我使用隐藏的iframe方法提交文件而不加载新页面,它可以在除了internetexplorer之外的所有浏览器上运行,这对于来自其他顶级浏览器来说是很奇怪的 表单和iframe如下所示: <iframe id="hidden_upload" style="display:none" src="" name="hidden_upload" ></iframe> <form class="" action="upload.php" method="post" targ

我使用隐藏的iframe方法提交文件而不加载新页面,它可以在除了internetexplorer之外的所有浏览器上运行,这对于来自其他顶级浏览器来说是很奇怪的

表单和iframe如下所示:

<iframe id="hidden_upload" style="display:none" src="" name="hidden_upload" ></iframe>
<form class="" action="upload.php" method="post" target="hidden_upload" enctype="multipart/form-data" id="uploadForm">
    <table>
        <tbody>
            <tr>
                <td><label for = "title">Title: </label></td>
                <td><input type="text" name="title" id="title" maxlength="40" style="width:300px;"/></td>
            </tr>

            <tr>
                <td><label for="description">Description: </label></td>
                <td><textarea id="description" name="description" style="width:460px;height:135px;"></textarea></td>
            </tr>

            <tr>
                <td><label for="file">File: </label></td>
                <td><input type="hidden"  name="MAX_FILE_SIZE" value="3145728" /><input id="file" type="file" name="file"/></td>
            </tr>

        </tbody>    
    </table>
    <center><input type="submit" value="Upload" id="filesubmit" onclick="return submitting()"/></center>
</form>

编辑:这完全是荒谬的。我将工作页面逐字复制到非工作页面,但仍然不起作用。唯一的区别是目录,而.htaccess文件是相同的

我遇到了这个问题,经过多次尝试后,问题才得以解决,如下所述:

“”

基本上,iframe需要这样创建:

iframe = document.createElement('<iframe name="fileUploaderEmptyHole">');
iframe=document.createElement(“”);
我还发现当前窗口的帧名称存储在window.frames中。在IE11中,windows.frames:O中所有iFrame的属性.name为空

我手动修复了以下问题:

for(i=0;i<window.frames.length;i++)
 window.frames[i].name = window.frames[i].frameElement.name;

对于(i=0;iI)您已发现问题,请回复,我也面临同样的问题issue@PRASANTH,我希望我能记得:(.到家后,我会查看网页,看看是否能找出我做了什么。如果我没有记错,那只是侥幸。无论你做什么,不要放弃。你能引用你的来源,并提供一些错误的例子,以及你做了什么来修复它。没有上下文,没有人会点击你的链接。
for(i=0;i<window.frames.length;i++)
 window.frames[i].name = window.frames[i].frameElement.name;