Saya ingin mengarahkan ulang ke halaman utama dari iframe javascript

//Will redirect the top most parent Iframe.
window.top.location.href = "http://www.example.com";

//Will redirect the parent iframe.
window.parent.location.href = "http://www.example.com"; 
Friendly Fowl