jQuery: load method - reload a specific part of a page without url?

别说谁变了你拦得住时间么 提交于 2019-12-08 05:46:15

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!