Uncaught TypeError: Cannot read property 'querySelector' of null
2017-05-08 21:41
686 查看
不能读取空的属性
需要分析前面的对象能不能调用这个方法
如果对象是ajax.responseXML
ajax.responseXML.querySelector('name').innerHTML
Uncaught TypeError: Cannot read property 'querySelector' of null
接下来找到你的php文件
在第二行添加:
header('content-type:text/xml;charset=utf-8');
需要分析前面的对象能不能调用这个方法
如果对象是ajax.responseXML
ajax.responseXML.querySelector('name').innerHTML
Uncaught TypeError: Cannot read property 'querySelector' of null
接下来找到你的php文件
在第二行添加:
header('content-type:text/xml;charset=utf-8');
相关文章推荐
- 关于js Uncaught TypeError: Cannot read property 'style' of null 问题
- Uncaught TypeError: Cannot read property of 'name' null
- Uncaught TypeError: Cannot read property 'click' of null问题的解决
- Uncaught TypeError: Cannot read property 'value' of null
- 关于"Uncaught TypeError: Cannot read property 'time' of null"的处理
- 在使用renderTo中遇到的Uncaught TypeError: Cannot read property 'insertAdjacentHTML' of null
- 安卓Webview 加载网页 Uncaught TypeError: Cannot read property 'getItem' of null",
- js提示Uncaught TypeError: Cannot read property 'options' of null
- canvas出现Uncaught TypeError: Cannot read property 'getContext' of null 错误
- discuz 出现了Uncaught TypeError: Cannot read property 'appendChild' of null
- js事件处理程序 Uncaught TypeError: Cannot read property 'addEventListener' of null
- JavaScript:Uncaught TypeError Cannot read property 'id' of null。
- Uncaught TypeError: Cannot read property 'value' of null
- Uncaught TypeError: Cannot read property 'prototype' of null using Openerp 7.0
- 在开发Ext 项目中如果遇到 Uncaught TypeError: Cannot read property 'insertAdjacentHTML' of null
- Uncaught TypeError: Cannot read property 'length' of null
- Uncaught TypeError: Cannot read property 'width' of null
- Uncaught TypeError: Cannot read property 'offsetTop' of null
- Uncaught TypeError: Cannot read property 'getItem' of null
- Uncaught TypeError: Cannot read property 'hasOwnProperty' of null