现在的位置: 首页 > 综合 > 正文

jquery $.ajax()取xml数据

2014年02月15日 ⁄ 综合 ⁄ 共 289字 ⁄ 字号 评论关闭

$.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

抱歉!评论已关闭.