如何更改window.open上的URL?为什么这不起作用?

时间:2019-12-01 17:40:43

标签: javascript

<button id="button1" onclick="window.open('https://www.facebook.com/','popup','width=700,height=300');"><strong>CONTINUAR</strong></button><br>
<button id="button2" onclick="window.open('https://www.google.com/','popup','width=700,height=300');"><strong>CONTINUAR</strong></button>

button1和button2可以正常工作,但是代码为什么不能与此URL一起使用?

<button id="button1" onclick="window.open('https://chrome.google.com/webstore/detail/gighmmpiobklfepjocnamgkkbiglidom?hl=es-419','popup','width=700,height=300');"><strong>CONTINUAR</strong></button><br>
<button id="button2" onclick="window.open('https://www.google.com/','popup','width=700,height=300');"><strong>CONTINUAR</strong></button>

关于button2的问题(不更改URL)?,有什么想法吗?

另一个示例:https://js-sozdcc.stackblitz.io/(带有该URL的button4不起作用)

0 个答案:

没有答案
相关问题