<!-- jQuery --> <script src="//cdn.bootcss.com/jquery/1.11.1/jquery.js"></script> <script type="text/javascript"> // 点击按钮 $(document).on("click",".ajax",function(){ window.history.pushState({ //添加访问历史 time: new Date().getTime() }, "", $(this).attr("href")); $.ajax({ url: $(this).attr("href"), //AJAX请求的是链接指向的页面 success: function(data) { $(".list").replaceWith($(data).find(".list")); //将结果替换到当前页面 document.title = $(data).filter("title").text(); //更改页面标题 } }); return false }); </script>