Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
562 views
in Technique[技术] by (71.8m points)

javascript - change url of already opened popup

Is it possible to change the url of the popup.

Assume I open a popup:

function pop1(){
    window.open('http://google.com','wind1');   
}

Can the url of the popup window 'wind1' be changed to say 'http://msn.com'. Something with location.href or any other solution.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
var w1 = window.open('http://www.canop.org','wind1');

w1.location.href='http://www.google.com';

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...