Add Javascript in AMP Pages

前端 未结 5 1305
灰色年华
灰色年华 2020-12-06 02:37

Please help me understand how to add javascript in the AMP (Accelerated Mobile Pages). My requirement is I get an ID in URL. For example localhost:8080/home?id=1.I would lik

5条回答
  •  一生所求
    2020-12-06 03:12

    Javascript blocks DOM construction and delays page rendering, so AMP allows only asynchronous Javascript - AMP pages can't include any custom Javascript. Interactive page features can be handled in custom AMP elements instead of using Javascript.

提交回复
热议问题