Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的网页中包含一个 javascript 文件。此文件托管在我无权访问的另一台服务器上,它会打开新窗口。这就是我想要停止的。有什么办法可以阻止新窗口打开?
我会发布这个,因为它对你有帮助:
在外部脚本加载之前添加:window.open = function() {};
window.open = function() {};