Refreshing one section of a page using Ajax context
问题 I'm trying to refresh just one part of my page when a user clicks a 'clear' button, currently I'm using a bit of code I hacked off another answer I found on here: $('.clear').click(function () { $.ajax({ url: "", context: document.body, success: function (s, x) { $(this).html(s); } }); }); This reloads the whole document body, how do I target a particular div or class? context: document.body.somediv? 回答1: jQuery API about the context option: This object will be made the context of all Ajax