对于< script>
HTML标签,lang =
Javascript和type = text / javascript之间的技术区别是什么?
我通常都使用这两者,因为我一直认为旧的浏览器需要一个或另一个.
解决方法
根据
HTML 4.01 Spec:
type:
This attribute specifies the scripting language of the element’s contents and overrides the default scripting language. The scripting language is specified as a content type (e.g.,“text/javascript”). Authors must supply a value for this attribute. There is no default value for this attribute.language: Deprecated. This attribute specifies the scripting language of the contents of this element. Its value is an identifier for the language,but since these identifiers are not standard,this attribute has been deprecated in favor of type.