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

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

how to get content of the current page

3条回答
  •  余生分开走
    2020-12-15 15:49

    You can use an element selector to get , for example:

    $("head")
    //for example:
    alert($("head").html()); //alerts the  children
    

    You can give it a try here

提交回复
热议问题