How can i redirect a I-frame location to another location? any idea? i have this kind of sample what I'm trying to do
I want this location to another one by click button inside of that site. when this site is logged in then when i pressed log out button I want to e back on this page but still in this I-frame.
How this is possible?
HTML
<iframe scrolling="no" src="">
</iframe>
How can i redirect a I-frame location to another location? any idea? i have this kind of sample what I'm trying to do
I want this location to another one by click button inside of that site. when this site is logged in then when i pressed log out button I want to e back on this page but still in this I-frame.
How this is possible?
HTML
<iframe scrolling="no" src="http://www.example./login">
</iframe>
Share
asked Sep 9, 2013 at 17:39
user2579060user2579060
2 Answers
Reset to default 5Give an id to your iframe
<iframe scrolling="no" src="http://www.example./login" id ="myframe">
</iframe>
then on your button click
var frame = document.getElementById('myframe');
frame.src = "your new src";
function DoubleOpen(site1, site2) {
var site2=site2;
document.getElementById("frame").src=site1;
setTimeout(function() { loadSite(site2); },4000);
}
function loadSite(site2){
document.getElementById("frame").src=site2;
}
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744930191a4601688.html
评论列表(0条)