gpt4 book ai didi

javascript - XHTML Mobile 1.0 - W3C 验证因脚本而无效

转载 作者:行者123 更新时间:2023-12-02 19:58:43 25 4
gpt4 key购买 nike

我正在尝试将 Google Analytics(分析)放入我的移动网页中,但似乎遇到了大问题。

尝试通过 W3C 验证器进行验证时,Google Analytics 代码周围的脚本标记被称为无效。

Line 10, Column 31: element "script" undefined<script type="text/javascript">

You have used the element named above in your document, but the document type you are >using does not define an element of that name. This error is often caused by:

incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "" element),by using vendor proprietary extensions such as "" or "" (this is usually fixed by using CSS to achieve the desired effect instead).by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).

我使用的是 XHTML Mobile 1.0,因为那是一个移动网站(所以我几乎无法对此进行更改)。有没有有效的方法可以在 XHTML Mobile 1.0 中放入标签?

最佳答案

<script> XHTML Mobile Profile 1.1 中添加了标签。最新的是 XHTML Mobile Profile 1.2。除非您有充分的理由,否则我不会使用 XHTML Mobile 1.0。

顺便说一句,iPhone、Android 等都可以很好地处理 HTML5。

关于javascript - XHTML Mobile 1.0 - W3C 验证因脚本而无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8271886/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com