Get partial HTML with AJAX

后端 未结 1 1251
死守一世寂寞
死守一世寂寞 2021-01-13 06:24

I am trying to get a content of a another page using AJAX call. I am able to get the entire document but is it possible to get a better precision and get only a section that

相关标签:
1条回答
  • 2021-01-13 06:34
    $('#dropHere').load('/dir/targetPage #ele');
    

    Where '#ele' is an element with the id of ele and all it's inner children.

    0 讨论(0)
提交回复
热议问题