设置< iframe>的HTTP请求类型 [英] Setting the HTTP request type of an <iframe>

查看:173
本文介绍了设置< iframe>的HTTP请求类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使iframe使用POST而不是GET请求?我不是试图将表单发布到iframe中,而是根据服务器上生成的数据加载iframe。



不幸的是,在这种情况下我不能使用Javascript因为这是公司的政策,检查必须可能没有JS)。

IFRAME SRC =/ yourscript总是使用GET。



<您可以 POST 到 IFRAME ,或者您可以 GET IFRAME POST 使用JS的形式;但你明确表示这些对你来说是不可行的)


Is it possible to make an iframe use a POST rather than a GET request? I am not trying to post a form into the iframe but load the iframe depending on data generated on the server.

Unfortunately, I can't use Javascript in this case (because it is the company's policy that the checkout must be possible without JS).

解决方案

No. IFRAME SRC="/yourscript" always uses a GET.

(You could POST to the IFRAME, or you can GET a page inside the IFRAME that POSTs a form using JS; but you specifically said those aren't viable for you)

这篇关于设置&lt; iframe&gt;的HTTP请求类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆