小编use*_*174的帖子

window.open()应该在同一个选项卡中打开链接

我是javascript的新手,编写了一个程序,它将打开一个查询字符串作为链接.
我使用了window.open(),但链接在新选项卡
中打开,我想在同一个选项卡中打开此链接.
代码如下.

var strquerystring;  
if(fromvalue==""||tovalue==""){  
  alert('kindly fill all the details');
}else{
  window.open(strquerystring);
}
Run Code Online (Sandbox Code Playgroud)

html javascript window.open

3
推荐指数
2
解决办法
2万
查看次数

标签 统计

html ×1

javascript ×1

window.open ×1