【发布时间】:2014-11-20 17:19:10
【问题描述】:
我想通过 iframe 传输发送带有文件和一些文本字段的发布请求。
(jquery-file-uload + jquery.iframe-transport)
主页地址http: //192.168.1.36:3001/index.html。请求地址为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)
但是"SCRIPT5 Access denied" in "form[0].submit()"。我替换了"form.submit()" to "form[0].submit()"。
我还尝试在表单中添加一个特殊的提交按钮并尝试触发(“点击”)。没用。
有可能吗?
谢谢
【问题讨论】:
-
你是想让父页面中的一些JS代码在iframe子页面中提交表单吗?
-
@MarcB 我正在尝试通过 iframe 传输从主页发送 ajax 请求。你阅读并理解了这个问题吗?
-
NOWHERE 在您的问题中您是否曾经提到过“ajax”,并且没有“iframe 传输”之类的东西。
-
@MarcB 有 一种 方法可以使用 jquery - AJAX 发送 post 请求。因此 iframe 传输可作为附加的 js 脚本使用(只需 google it)。你能胜任这个主题吗?
标签: internet-explorer iframe internet-explorer-9 jquery-file-upload jquery-iframe-transport