当前位置:Gxlcms > JavaScript > js下弹出窗口的变通

js下弹出窗口的变通

时间:2021-07-01 10:21:17 帮助过:3人阅读

所以用的代码是:
onChange="window.open(this.options[this.selectedIndex].value,'_blank')"
但这样很容易被屏蔽的...有更好的办法吗
可以用变通的方法,
1.页面用<a id="aa" target=_blank></a>
2.document.getElementById('aa').href=this.options[this.selectedIndex].value;
3.执行document.getElementById('aa').click

人气教程排行