<gt> <st>sample1</st> <tt>sample2</tt> <tt>sample3</tt> </gt>
我需要在Java脚本文件中获取节点值.我怎样才能获得价值?
var xml = "<gt><st>sample1</st><tt>sample2</tt><tt>sample3</tt></gt>",xmlDoc = $.parseXML(xml),$xml = $( xmlDoc ),$st = $xml.find( "st" ); alert( $st.text() );
见js fiddle example