Uncaught TypeError: Cannot read property 'length' of null

错误怎么处理?

1.可能是返回的datagrid数据格式有问题,比如{"total":0,"rows":null},改为{"total":0,"rows":"[]"}就可以了

 

if (capital != null && capital.length < 1) {

Uncaught TypeError: Cannot read property 'length' of null错误怎么处理?的更多相关文章

  1. day01-JavaScript中"Uncaught TypeError: Cannot set property 'innerHTML' of null"错误

    转行学开发,代码100天.初写了最简的一段Js代码,即通过document中的innerHTML方法修改一个<p>标签的内容,报以下错误. -"Uncaught TypeErro ...

  2. JavaScript中"Uncaught TypeError: Cannot set property 'innerHTML' of null"错误

    写了一个函数,在调用时出错:"Uncaught TypeError: Cannot set property 'innerHTML' of null" 代码如下: <!DOC ...

  3. 前台报错:Uncaught TypeError: Cannot read property '0' of null

    错误现象: var div1=mycss[0].style.backgroundColor;  //这一行提示360和chrome提示:Uncaught TypeError: Cannot read  ...

  4. Uncaught TypeError: Cannot read property 'insertAdjacentHTML' of null

    在开发Ext 项目中如果遇到 Uncaught TypeError: Cannot read property 'insertAdjacentHTML' of null 这个错误,检查下renderT ...

  5. Uncaught TypeError: Cannot set property 'innerHTML' of null

    学习Chrome插件时,要在弹出页面中显示当前时间,结果怎样也显示不出来 看了 http://www.cnblogs.com/mfryf/p/3701801.html 这篇文章后感悟颇深 通过调试发现 ...

  6. Three.js three.js Uncaught TypeError: Cannot read property 'getExtension' of null

    在调试Three.js执行加载幕布的时候,突然爆出这个错误three.js Uncaught TypeError: Cannot read property 'getExtension' of nul ...

  7. JavaScript Uncaught TypeError: Cannot read property 'value' of null

    用 JavaScript 操作 DOM 时出现如下错误: Uncaught TypeError: Cannot set property 'value' of null Uncaught TypeEr ...

  8. TypeError: Cannot read property 'length' of null

    本文为博主原创,未经允许不得转载: 异常展示: [Vue warn]: Error in getter for watcher "filterAndSortData": " ...

  9. 解决sweetalert 无故报错 elem.className.replace Uncaught TypeError: Cannot read property 'className' of null

    今天碰到这么一个问题,在使用sweetalert的时候时有时无会报错 elem.className.replace Uncaught TypeError: Cannot read property ' ...

随机推荐

  1. VUE项目中使用this.$forceUpdate();解决页面v-for中修改item属性值后页面v-if不改变的问题

    VUE项目中使用this.$forceUpdate();解决页面v-for中修改item属性值后页面v-if不改变的问题:https://blog.csdn.net/jerrica/article/d ...

  2. 使用before和after双伪元素清除浮动

    使用方法: .clearfix:before,.clearfix:after { content:"."; display:table; } .clearfix:after { c ...

  3. 同一台电脑管理多个SSH KEY

    同一台电脑关于多个SSH KEY管理 笔者之前为电脑中的homestead虚拟机配置过id_rsa,但现在因为想在github上搭建基于hexo的博客,所以需要配置github的ssh key,因此产 ...

  4. java int转Short

    使用short(xx) problemMultipleChoiceDO.setExamCount((short)0);//在数据库中是smallint类型

  5. Delphi7所使用的WinAPI大全(摘自VCL源码,一共1200个函数)

    经过我整理的,去掉了A和W的重复.虽然没写注释,但以后要一个一个研究.有这些WINAPI就够用了. kernel32 = 'kernel32.dll'; gdi32 = 'gdi32.dll'; us ...

  6. docker容器配置hosts

    在mac开发的时候,docker容器没有配置hosts,但是mac本机配置了hosts,这个本机的hosts配置对docker容器里面的所有容器都适用,但是到了linux的时候反而不适用了 可以通过下 ...

  7. CSS链接使用伪类的顺序

    顺序为:link-visited-hover-active a:link {color: #FF0000} /* 未访问的链接 */ a:visited {color: #00FF00} /* 已访问 ...

  8. Gcc如何知道文件类型。

    Linux系统不区分扩展名,但是GCC编译器通过扩展名区分. GCC是根据扩展名来编译源文件的.

  9. mirror - 映射在远端节点上的档案

    总览 SYNOPSIS mirror [flags] -gsite:pathname mirror [flags] [package-files] 描述 DESCRIPTION Mirror 是以 P ...

  10. 1130. Infix Expression (25)

    Given a syntax tree (binary), you are supposed to output the corresponding infix expression, with pa ...