Html “脚本元素上的语言属性已过时。您可以放心地省略它。”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10001983/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"The language attribute on the script element is obsolete. You can safely omit it."?
提问by Henrik Petterson
According to the W3C validator, I am getting this error:
根据 W3C 验证器,我收到此错误:
The
language
attribute on thescript
element is obsolete. You can safely omit it.…uage="JavaScript" src="js/gen_validatorv31.js" type="text/javascript"></script>
在
language
该属性上的script
元件是过时的。您可以放心地省略它。…uage="JavaScript" src="js/gen_validatorv31.js" type="text/javascript"></script>
How do I fix this?
我该如何解决?
I checked through the script and it should not be an issue.
我检查了脚本,这应该不是问题。
回答by Brandon
<script type="text/javascript" src="js/gen_validatorv31.js"
language="JavaScript"></script>
You don't need to include redundant language="JavaScript"
. Specifying just the type
and src
is valid, language
is obsolete, remove it.
您不需要包含冗余的language="JavaScript"
. 仅指定type
andsrc
有效,language
已过时,将其删除。