how to get <head> content of the current page with jquery or JS

前端 未结 3 1020
无人及你
无人及你 2020-12-15 15:11

how to get content of the current page

3条回答
  •  感动是毒
    2020-12-15 15:57

    You could use the javascript DOM API like this:

    var headContent = document.getElementsByTagName('head')[0].innerHTML;
    

提交回复
热议问题