开发者

How to unload content from loaded div by AJAX

开发者 https://www.devze.com 2022-12-08 22:16 出处:网络
I loaded some content in a DIV with AJAX. Then, i loaded different content from content that i loaded before. But it seems, previous loaded content is no开发者_如何学JAVAt gone, cuz there is a conflic

I loaded some content in a DIV with AJAX. Then, i loaded different content from content that i loaded before. But it seems, previous loaded content is no开发者_如何学JAVAt gone, cuz there is a conflict between same named elements.

Is there a way to clean up that previously loaded content?


You can always set a blank value to the div if you no longer need the content.

 $('#yourdiv').html("");
 //reload with AJAX


yourDiv.innerHTML = "";
0

精彩评论

暂无评论...
验证码 换一张
取 消