js下彈出窗口的變通
更新時間:2007年04月18日 00:00:00 作者:
所以用的代碼是:
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.執(zhí)行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.執(zhí)行document.getElementById('aa').click
相關(guān)文章
微信小程序?qū)崿F(xiàn)點擊頁面出現(xiàn)文字
這篇文章主要介紹了微信小程序?qū)崿F(xiàn)點擊頁面出現(xiàn)文字,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下2020-09-09詳解JavaScript中扁平與樹形數(shù)據(jù)的轉(zhuǎn)換
這篇文章主要為大家想介紹了JavaScript中實現(xiàn)扁平與樹形數(shù)據(jù)相互轉(zhuǎn)換的方法,文中的示例代碼講解詳細,對我們學(xué)習(xí)JavaScript有一定的幫助,需要的可以參考一下2023-01-01詳解js產(chǎn)生對象的3種基本方式(工廠模式,構(gòu)造函數(shù)模式,原型模式)
本篇文章主要介紹了js產(chǎn)生對象的3種基本方式(工廠模式,構(gòu)造函數(shù)模式,原型模式) ,具有一定的參考價值,有興趣的可以了解一下2017-01-01