2014-06-27 89 views
0

我想在另一個html頁面中打開一個iframe女巫的表單動作url。 我成功地打開了它在IFRAME女巫是在同一頁上使用此代碼:在另一個html頁面中打開表單動作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> 

所以,我的問題很簡單:我怎樣才能在一個iframe這是另一個html頁打開form行動網址是什麼?

+0

你想獲得表單的'action'屬性的URL,然後將其顯示在iframe中? *只是*網址?與請求無關? – esqew

回答

0

據我所知,沒有辦法直接訪問該iFrame。我想你必須將數據傳遞給父級,然後讓它調整嵌入式iFrame的URL。我可能會通過服務器端腳本執行此操作,但是您可以通過JavaScript來完成。

相關問題