我在单击的链接处加载页面的内容href
using .load()
,如下所示:
$("html").on('click', 'a', function(event) {
event.preventDefault(); // obviously
var url = this.href + " #main"; // holds the content of #main at a given url
$('#ajax-container').load(url); // loads that content into #ajax-container
document.title = "?";
});
如何获取加载页面的标题并显示它?