js读取xml的问题
<BlogInfo bpId= "斧头帮 " blogId= "73 " templateId= "1 " visitNum= "44 " bpNum= "85 "> <faceUrl> </faceUrl>
怎么得到 js 怎么得到 visitNum
------解决方案--------------------试试
<script>
var xmlDoc=new ActiveXObject( "Microsoft.XMLDOM ");
xmlDoc.async = false
xmlDoc.load( "BlogInfo.xml ");
var visitNum= xmlDoc.getElementsByTagName( 'BlogInfo ')[0].getAttribute( "visitNum ");
alert(visitNum);
</script>