How to reload a div without reloading the entire page?

前端 未结 4 497
Happy的楠姐
Happy的楠姐 2020-12-08 18:02

I suppose what I am asking is really easy for most of you. I want to reload a div without reloading the entire page. What\'s the best way to do it?

4条回答
  •  猫巷女王i
    2020-12-08 18:26

    Use this.

    $('#mydiv').load(document.URL +  ' #mydiv');
    

    Note, include a space before the hastag.

提交回复
热议问题