MaxiWheatRicket提出了一个问题:HTML Script tag: type or language (or omit both)?,或许与您遇到的问题类似。
回答者gregersMatchu给出了该问题的处理方式:
The language attribute has been deprecated for a long time, and should not be used.
When W3C was working on HTML5, they discovered all browsers have "text/javascript" as the default script type, so they standardized it to be the default value. Hence, you don't need type either.
For pages in XHTML 1.0 or HTML 4.01 omitting type is considered invalid. Try validating the following: