load関数で別ページの要素を読み込む
load関数は特定のページの 特定の要素に対して読み込むこともできる
index.html
<script>
$("#link").on("click",function(){
var href = $(this).attr(href);
$("#content").load( href + " div#content");
});
</script>
<a href="test.html" id="link">リンク</a>
<div id="content">ここにテキスト</div>
test.html
<div id="content">test.htmlのテキスト</div>
PHPを使ってページャーを作成し load関数を使ってAjaxのようなコンテンツを作ることもできる