1. 程式人生 > >重新整理區域性iframe

重新整理區域性iframe

document.getElementById('FrameID').contentWindow.location.reload(true);  

如果沒有使用ID則先獲取到當前 iframe 並找到其物件重新整理 例

var iframe = document.getElementsByTagName('iframe')[i];
var ifr_document = iframe.contentWindow.document;
   ifr_document.location.reload();