jquery $.ajax()取xml数据

$.ajax({
type: "get",
url: "Database/App_all.xml",
dataType: "xml",

async : false,

timeout: 2000,
beforeSend: function () {},
success: function (xml) {
$(xml).find("app[id='id-1']").find("auther").appendTo($("#contain"));
},
error: function () {
alert("ajax failed!");
}
});

详细出处参考:http://www.jb51.net/article/25348.htm

你可能感兴趣的:(jquery,xml,Ajax,function,url)