var u="http://www.baidu.com"; window.location.href=u; //在当前的窗口打开 window.open(u,'content','',false); //在<iframe name="content"></iframe>中打开