我有一个 ajax 函数调用一个 visualforce 页面。响应返回带有 html doctype 的结果。我只想要数据。
$(document).ready(function() {
$.ajax({
type: "POST",
url: "/apex/HotStuckLeadReportAjaxPage",
data: { name: "John", location: "Boston" }
}).done(function( msg ) {
alert( "Data Saved: " + msg );
});
});
输出:
Data Saved:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
{"sEcho":0,"iTotalRecords":"2","iTotalDisplayRecords":"2","aaData":[["8","1","sdf","test","test"],["9","12","asdf","asdf","asdf"]]}</html>