function openwin(){
var newwindow=window.open("","newwindow");
newwindow.location.href="http://www.baidu.com";
}
setTimeout("openwin()", 5000);
请问大神,为何这段代码打开的新窗口为空白
js location.herf不能打开新的窗口
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
6条回答
- BestwishesTolover 2016-10-31 10:03关注
你要么就window.open('') ,要么就window.location.href='' ,为什么要嵌套呢
解决 无用评论 打赏 举报