i've got a simple xml file (called by ajax) that contains only:
<result>1</result>开发者_开发问答
with jquery, i can get the value (1) of result?
thanks! Rob
$.ajax({
url: '/foo.xml',
success: function(xml) {
alert($(xml).find('result').text());
}
});
jQuery.get('myxml.xml', function(xml){
var result = jQuery(xml).text();
alert(result);
});
精彩评论