我必须从没有正则表达式的ajax成功数据中获取文档标题。例如,这不起作用:http://jsfiddle.net/7UyRa/
$(function() {
$.ajax({
url: 'http://somesite.com',
success: function(source) {
var title = $(source).attr('title');
//or
var title = $(source).find('title').text();
console.log(title);
}
});
});
返回'undefined'