Hi, the picture is a sample page include one iframe and one button.
The iframe has load a default web page 1. What I want to do is when someone click on the button, the page which in iframe can be redirect to another fixed page and auto refresh by any 5 seconds.
[ATTACH]15501[/ATTACH]
I got these code now, but can only refresh page by one click...
HTML
<!--Button-->
<button onclick="refreshIframe();">Refresh Iframe</button>
<!--iframe-->
<iframe name="Iframe" src="http://www.google.com/" target="_blank">
Javascript part
function refreshIframe() {
var ifr = document.getElementsByName('Iframe')[0];
ifr.src = ifr.src;
}
Anyone helppppppppppp
The attachments of this post were removed during the platform migration in 2018