复制代码 代码如下:
var $xml = $("<aa><bb para=\"bbpara\">bbtext</bb> <cc> cctext </cc><cc>789798</cc>aatext</aa>");
function log(o){
$("textarea").val($("textarea").val()+"\n"+o);
}
log($xml.text());
log($xml.html());
log($xml.children("cc").html());
log($xml.children("bb").attr("para"));
log("each");
$xml.find("cc").each(function(){
log($(this).text());
});
网友评论文明上网理性发言已有0人参与
发表评论: