【问题标题】:Open form action in another html page iframe在另一个 html 页面 iframe 中打开表单操作
【发布时间】:2014-08-18 14:42:54
【问题描述】:

我正在尝试在另一个 html 页面中的 iframe 中打开表单操作 url。 我成功地在 iframe 中打开了它,该 iframe 与此代码位于同一页面上:

<form class="form" action="myConnexionURL" target="iframe-myAccount" method="post">
     <input type="text" id="login" name="login" placeholder="ID">
     <input type="password" id="pass" name="pass" placeholder="PSW">
     <input type="submit" value="Connexion">
</form>

<iframe src="" name="iframe-myAccount"></frame> 

所以,我的问题很简单:如何在另一个 html 页面中的 iframe 中打开 form 操作 URL?

【问题讨论】:

  • 您想获取表单的action 属性的URL,然后将其显示在iframe 中? 只是 URL?与请求无关?

标签: html forms iframe


【解决方案1】:

据我所知,无法直接访问该 iFrame。我认为您必须将数据传递给父级,然后让它调整嵌入式 iFrame 的 URL。我可能会通过服务器端脚本来执行此操作,但您可以通过 JavaScript 来执行此操作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多