zoukankan      html  css  js  c++  java
  • <script language="JavaScript"> or <script type="text/javascript"> ?

    When embedding JavaScript in ASP.NET/HTML, what are the differences between the following codes, if any?
     
     
    <script language="JavaScript"> is deprecated as "language" value is an identifier which has no standards.

    type="text/javascript" is the correct syntax. This overrides the default scripting language.
     
     
     
     
     
    type = content-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" ). We have to supply a value for this attribute. There is no default value for this attribute.


    language ="JavaScript"

    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(outdated by newer constructs) in favor of type.
  • 相关阅读:
    npm 安装卸载模块 & ionic插件安装与卸载
    Vue中v-model解析、sync修饰符解析
    Vue props用法详解
    vue页面跳转
    Swift 4 中的泛型
    Swift枚举的全用法
    蓝牙 BLE 三种 UUID 格式转换
    SVG图案
    SVG渐变
    SVG坐标系统及图形变换
  • 原文地址:https://www.cnblogs.com/mount/p/2252388.html
Copyright © 2011-2022 走看看