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.
我们有一个内部应用程序,它使用 google map api 创建地图工具提示。当访问 google 的映射 js 文件被阻止时,网站上的其余 javascript 也会中断。如果无法访问,有没有办法阻止加载 js 文件?
首先,我建议使用 require.js 以更智能的方式加载 js 脚本。
但是,如果您不想这样做,也许在您的脚本标签中添加“异步”属性就可以了。