を助けてください。それは最も簡単です。 https://jquery.com
ロードする必要があるページの一部のみを返すバックエンドが必要です。あなたの項目で
var $container = $('#container'); // It's a block that will be used for content displaying
// Renderring content
function renderPage(response) {
// Wrapped content hidden by default
var $content = $('<div style="display: none">' + response + '</div>');
// Then clear current content
$container.find('*').remove();
// Then append our response and fade it to display
$content.appendTo($container).stop(true, true).fadeIn(300);
}
// Loading page
function loadPage(url, params) {
$.get(url, (params||{}), renderPage);
}
// Adding handler
function go(e) {
loadPage($(e).attr('href'));
return false;
}
そして:
<ul>
<li><a href="/some/page.html" onclick="return go(this);">Page</a></li>
</ul>
あなたのページの一部を返しますバックエンドを持っている場合、または$ .LOAD
http://api.jquery.com/load/
(推奨されません)を使用