When loading an html page via ajax, will script tags be loaded?

后端 未结 5 1994
南笙
南笙 2020-11-27 14:23

When you load an html document using AJAX, what does it do with the nodes inside the HEAD tag: (script,link,style,meta,title) ignore them or load and parse them? And in the

5条回答
  •  醉话见心
    2020-11-27 15:19

    No they will not be interpreted.

    HTML can be loaded either by using innerHTML, or by DOM manipulation. In both cases, if the HTML contains script tag, however, it will be interpreted.

提交回复
热议问题