如何在AMP页面中添加自定义JavaScript或外部js? [英] How to add custom javascript or external js in AMP page?
本文介绍了如何在AMP页面中添加自定义JavaScript或外部js?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试在AMP页面中添加外部js文件,但AMP验证程序拒绝了它.有什么解决方法吗?
I have tried adding external js file in AMP page but AMP validator rejects it. Is there any workaround for it?
推荐答案
实际上,您现在可以选择将自定义javascript添加到具有<amp-script>
组件的AMP页面.
https://amp.dev/documentation/guides-and-tutorials/develop/custom-javascript/
Actully now you have option to add custom javascript to a AMP page with <amp-script>
component.
https://amp.dev/documentation/guides-and-tutorials/develop/custom-javascript/
这篇关于如何在AMP页面中添加自定义JavaScript或外部js?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文