xml = '<?xml version="1.0" encoding="utf-8"?><root><html><a href="#">the new link</a></html></root>';
这些变量是我的
$(function(){
xml = '<?xml version="1.0" encoding="utf-8"?><root><html><a href="#">the new link</a></html></root>';
$xmls =$($.parseXML( xml ));
$('button').on('click',function(){
console.log($xmls.find('html > *')[0]);
$('body').append($xmls.find('html > *')[0]);
});
})
添加了一个标签不起作用
pre标签将显示为A标签