JS读取XML支持火狐
if(navigator.userAgent.indexOf("MSIE")>0){
orderDoc2 = new ActiveXObject("MSXML2.DOMDocument.3.0");
}
else
{
orderDoc2 = document.implementation.createDocument("","",null);
}
orderDoc2.async="false"
orderDoc2.load("xueli.xml");
var sortField2=orderDoc2.selectNodes("/xueli/xl");
function ChooseStateS()
{
for(var i=0;i<sortField2.length;i++)
{
var oOption2 = document.createElement('OPTION');
var prov2=sortField2[i].getAttribute('text');
var provid2=sortField2[i].getAttribute('id');
oOption2.text = " "+prov2+" ";
oOption2.value = provid2;
document.getElementById('xueli').options.add(oOption2);
}
}
function xianshi()
{
document.getElementById("xuanze").style.display="block";
}
function guanbi()
{
document.getElementById("xuanze").style.display="none";
}
</script>
为什么还是不支持火狐浏览器呢,应该怎么做呢?
补充:.NET技术 , ASP.NET