问题描述
Javascript在IE中工作正常,但在其他浏览器中没有,它显示未定义错误
我尝试过:
我的鳕鱼是:
var data = XmlHttp.responseXML.documentElement;
if(data.getElementsByTagName('Description')[0] .text ==&& data.getElementsByTagName('Course_Info')[0] .text!=)
{
textInfo = data.getElementsByTagName('Course_Info')[0] .lastChild.nodeValue;
document.getElementById('txtAreaShow')。value = textInfo;
}
我尝试了很多方法,但没有得到答案。有没有解决方案?
Javascript work correct in IE but not in other browsers,it showing 'undefined' error
What I have tried:
my cod is:
var data=XmlHttp.responseXML.documentElement;
if ( data.getElementsByTagName('Description')[0].text =="" && data.getElementsByTagName('Course_Info')[0].text !="")
{
textInfo=data.getElementsByTagName('Course_Info')[0].lastChild.nodeValue;
document.getElementById('txtAreaShow').value = textInfo;
}
I tried many ways,but not get the answer. Is there any solution?
推荐答案
这篇关于在firefox,chrome中解析xml时,Javascript返回'undefined'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!