不能读取空的属性
需要分析前面的对象能不能调用这个方法
如果对象是ajax.responseXML
ajax.responseXML.querySelector('name').innerHTML
Uncaught TypeError: Cannot read property 'querySelector' of null
接下来找到你的php文件
在第二行添加:
header('content-type:text/xml;charset=utf-8');
版权声明:本文为irouduoduo原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。