js下弹出窗口的变通
时间:2021-02-04 11:36:50|栏目:JavaScript代码|点击: 次
所以用的代码是:
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
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
上一篇:Jquery具体实例介绍AJAX何时用,AJAX应该在什么地方用
栏 目:JavaScript代码
下一篇:基于JS实现textarea中获取动态剩余字数的方法
本文标题:js下弹出窗口的变通
本文地址:http://www.codeinn.net/misctech/57010.html






