问题
i wondered if it's possible to just reload a specific div of a page without passing a url?
$('a.reload').live('click', function(e) {
$sv.load(" #inside")
});
if I click the reload-link i want just to reload the div with the ID inside on the current page. Is there a trick on how to do so with jquery?
regards
回答1:
No, it's not possible, but luckily you can pass the URL for the page with window.location.href and then filter out everything but the thing you want:
$('#inside').load(window.location.href + ' #inside');
来源:https://stackoverflow.com/questions/3261308/jquery-load-method-reload-a-specific-part-of-a-page-without-url