[英]How to redirect an URL to a parent iframe
當我使用這個(php)禁止他從我的聊天框中禁用他時,我試圖重定向我的頁面的用戶:
header("location: index.php");
exit;
問題是index.php頁面在連接用戶部分內部打開,在這種情況下在div
內部。 如何重定向用戶的主頁面?
謝謝你的時間。
在javascript代碼中嘗試這個:
window.top.location.href = "http://www.site.com";
這是使用javascript的答案:
window.parent.location = "http://www.example.com/index.php";
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.