js

您所在的位置:网站首页 chrome打开新标签留在当前标签 js

js

2023-11-06 20:58| 来源: 网络整理| 查看: 265

窗口name值 描述 _blank 默认的,在新窗口打开链接的url _self 在当前窗口打开链接url _parent 在父窗口打开链接url _top 在顶级窗口打开url framename 在指定的框架中打开链接url

window.open(url, [name], [configuration])

url, 为要新打开页面的url name,为新打开窗口的名字,可以通过此名字获取该窗口对象 configuration,为新打开窗口的一些配置项,比如是否有菜单栏、滚动条、长高等等信息 onclick="javascrtpt:window.open('http://www.xxx.com')" onclick="javascrtpt:window.open('http://www.xxx.com','_self','')"

1、在新标签/页面中打开链接 window.open(‘http://www.xxx.com‘,’target’,”);

2、在当前页面中打开链接 (1)window.open(‘http://www.xxx.com‘,’_self’,”); (2)window.location.href=’http://www.xxx.com‘;



【本文地址】


今日新闻


推荐新闻


    CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3