简体   繁体   English

在上次查看的页面上刷新iframe

[英]Refresh Iframe on last viewed page

Im working on a basic site editor. 我正在开发基本的网站编辑器。 I view my editable webpage from a iframe and when I make changes the iframe reloads back to the index page of the iframe. 我从iframe查看可编辑的网页,并在进行更改后将iframe重新加载回iframe的索引页。 How can I reload the current page and not get redirected back to the index page? 如何重新加载当前页面而不重定向到索引页面?

Im using jquery to reload the iframe using .click and $.ajax success. 我使用jquery通过.click和$ .ajax成功重新加载iframe。

$("#mainFrame")[0].src = $("#mainFrame")[0].src;

我发现这可行...

$("#myID")[0].src = $('#myID').contents().get(0).location.href;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM