- AMP:Building Accelerated Mobile Pages
- Ruadhan O'Donoghue
- 79字
- 2021-07-08 10:04:01
Using JavaScript in AMP pages
Let's deal with our first non-boilerplate error message:
The tag 'script' is disallowed except in specific forms.
In AMP, to guarantee performance, the use of JavaScript is greatly restricted. You can't write your own scripts, or include non-AMP JavaScript code. To fix this error, just remove the following line from your AMP document.
<script type="text/javascript" src="script.js"></script>
Don't worry, it's not needed. It was only included to demonstrate what the validator thinks of you including your own JavaScript!
推薦閱讀
- Beginning C++ Game Programming
- OpenCV for Secret Agents
- Python Game Programming By Example
- 基于免疫進化的算法及應用研究
- JSP開發案例教程
- Quarkus實踐指南:構建新一代的Kubernetes原生Java微服務
- jQuery開發基礎教程
- SQL Server實用教程(SQL Server 2008版)
- 詳解MATLAB圖形繪制技術
- Visual Studio 2015高級編程(第6版)
- OpenCV Android Programming By Example
- ABAQUS6.14中文版有限元分析與實例詳解
- 微前端設計與實現
- Practical Maya Programming with Python
- Visual Basic語言程序設計基礎(第3版)