[removed] tag vs [removed] tag

后端 未结 5 1926
误落风尘
误落风尘 2020-11-28 05:38

I was just wondering, what is the difference between



        
5条回答
  •  再見小時候
    2020-11-28 06:06

    In HTML 4, the type attribute is required. In my experience, all browsers will default to text/javascript if it is absent, but that behaviour is not defined anywhere. While you can in theory leave it out and assume it will be interpreted as JavaScript, it's invalid HTML, so why not add it.

    In HTML 5, the type attribute is optional and defaults to text/javascript

    Use

提交回复
热议问题