Xml: & amp; lt; forStatus & amp; gt; & amp; lt; values & amp; gt; & amp; lt; content & amp; gt; quanqin & amp; lt; content & amp; gt; & amp; lt; el & amp; gt; F & amp; lt; el & amp; gt; & amp; lt; values & amp; gt; & amp; lt; values & amp; gt; & amp; lt; content & amp; gt; travel & amp; lt; content & amp; gt; & amp; lt; el & amp; g reprinted. please specify the source: Jquery reads xml
Xml:
Quanqin
F
Business trip
D
On the way to travel
T
Jquyery
Var option = "";
$.get('../Handler/AttendanceStatus.xml', function (d) { $(d).find('values').each(function () { var $val = $(this); var el = $val.find("el").text(); var des = $val.find("content").text(); option += "" + des + ""; //alert(option); }); strAttendanceStatusSelect = "" + option + ""; //alert(strAttendanceStatusSelect); });
The above is the content for Jquery to read xml. For more information, see The PHP Chinese website (www.php1.cn )!