【问题标题】:HTML5 Validation error on Script?脚本上的 HTML5 验证错误?
【发布时间】:2015-06-04 09:19:12
【问题描述】:

我的 HTML5 验证出现奇怪错误

Error: Bad value text for attribute type on element script: Subtype missing.

From line 316, column 1; to line 316, column 40

e="1" />↩↩<script id="viewModel" type="text">↩ {

Syntax of MIME type:
    A media-type as defined in RFC 2616; that is, typically, a required type, followed by a "/" character, followed by a required subtype, optionally followed by one or more instances of a ";" character followed by a parameter. Examples: text/css, text/css;charset=utf-8.

我需要做什么来解决这个错误知道吗?

【问题讨论】:

  • 对于 html5,您可以简单地删除 type 属性

标签: javascript html mime-types


【解决方案1】:

脚本类型不能是纯文本。它后面是这样的子类型:

text/javascript
text/vbscript

等等

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-12-10
    • 1970-01-01
    • 2013-01-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多