What is the difference between “lang” and “type” attributes in a script tag?

后端 未结 7 1156
攒了一身酷
攒了一身酷 2020-12-05 15:54

For

7条回答
  •  爱一瞬间的悲伤
    2020-12-05 16:26

    Type is more general and refers to the mime encoding of the script block. As far as I know you only need one and usually the block will work without either type or lag attributes.

    I tend to use type.

提交回复
热议问题