html script tag not using type javascript [removed]?

前端 未结 2 1982
野趣味
野趣味 2021-01-01 21:18

I was checking out the source on an html page and came across this



        
2条回答
  •  耶瑟儿~
    2021-01-01 22:11

    Script elements that have an unknown content-type are simply ignored, in this case, the browser doesn't know how to execute a text/html script.

    It's a common technique used by some JavaScript templating engines.

    See also:

    • JavaScript Micro-Templating
    • JavaScript Templating Engines

提交回复
热议问题