Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Internet explorer IE9脚本5访问被拒绝_Internet Explorer_Iframe_Internet Explorer 9_Jquery File Upload_Jquery Iframe Transport - Fatal编程技术网

Internet explorer IE9脚本5访问被拒绝

Internet explorer IE9脚本5访问被拒绝,internet-explorer,iframe,internet-explorer-9,jquery-file-upload,jquery-iframe-transport,Internet Explorer,Iframe,Internet Explorer 9,Jquery File Upload,Jquery Iframe Transport,我想通过iframe传输发送带有文件和一些文本字段的post请求 (jquery文件uload+jquery.iframe传输) 主页的urlhttp://192.168.1.36:3001/index.html。请求url是http://192.168.1.36:3001/api/upload 我已经读过: 等等问题 其他信息: browser: ie 9.0.8112.16421 headers of /index.html: Cache-Control:no-cache Cache

我想通过iframe传输发送带有文件和一些文本字段的post请求

(jquery文件uload+jquery.iframe传输)

主页的url
http://192.168.1.36:3001/index.html
。请求url是http://192.168.1.36:3001/api/upload

我已经读过:

等等问题

其他信息:

browser: ie 9.0.8112.16421

headers of /index.html: 

Cache-Control:no-cache
Cache-Control:public, must-revalidate, proxy-revalidate
Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/html
Date:Thu, 25 Sep 2014 19:34:41 GMT
Expires:Thu, 25 Sep 2014 19:34:40 GMT
Last-Modified:Thu, 25 Sep 2014 19:17:41 GMT
P3P:CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"
Pragma:public
Server:nginx/1.6.2
Transfer-Encoding:chunked
Vary:Accept-Encoding

domain in iframe is 192.168.1.36, domain in main page is same (192.168.1.36)
但是,
“表单[0].submit()”中的“脚本5访问被拒绝”
。我将
“form.submit()”替换为“form[0].submit()”

我还尝试在表单中添加一个特殊的提交按钮,并尝试触发(“单击”)。不起作用

有可能吗

谢谢你,约翰

当你写道:

我还尝试在表单中添加一个特殊的提交按钮,并尝试触发(“单击”)。不起作用

这是否意味着您试图使用
元素以外的其他内容触发文件浏览?例如,试图通过隐藏文件输入元素来设置浏览按钮的样式

如果是这样的话,SCRIPT5错误是因为IE9认为试图阻止非用户发起的上传是安全的

解决方案: 如果将文件输入元素的样式设置为
可见性:隐藏
而不是
显示:无
,并且您使用标签来启动操作,它将起作用。 您可以根据需要设置标签的样式,它几乎可以完成您希望它完成的所有操作(我无法使用键盘焦点和Enter键)

e、 g.以下几点对我很有用:

<label class="my-label-button-style">
    <input type="file" class="my-ie9-hidden-file-input"/>
    Click me
</label>

您试图让父页面中的一些JS代码在iframe子页面中提交表单?@MarcB我试图从主页通过iframe传输发送ajax请求。您是否阅读并理解了这个问题?在您的问题中,您没有提到过“ajax”,也没有“iframe传输”这样的东西。@MarcB有一种方法可以使用jquery-ajax发送post请求。因此,iframe传输可以作为附加的js脚本使用(只需googleit)。你能胜任这个主题吗?可能是重复的
.my-ie9-hidden-file-input {
    visibility: hidden;
    position: absolute;
    width: 1px;
    height: 1px;
}