嘗試使用第三方表單解決問題,但不幸必須使用iframe將其嵌入到文章內容中。當用戶提交他們的電子郵件地址時,感謝頁面將在iframe佔用的空間中打開,而不是在頁面/新窗口中打開。我試着用下面的JS腳本無濟於事:IFrame表單提交在框架中打開,需要在新窗口中打開
<script type="text/javascript">
// If "&_parent=URL" is in this page's URL, then put URL into the top window
var match = /_parent=(.+)/.exec(window.location.href);
if (match != null) {
top.location = match[1];
}
</script>
有問題的網頁:
http://restoringqualityoflifeblog.org/subscribe/
謝謝!
這是非常艱難的編輯什麼的iframe本身的內部發生。查看錶單本身如何提交給服務器,並用你自己的表單模仿它可能會更容易 – Chizzle