网页学习体会

  • 首页
  • 个人博客
您的位置: 首页  >  技术问答  >  控制台报错:Uncaught TypeError: Cannot read property 'value' of null

控制台报错:Uncaught TypeError: Cannot read property 'value' of null

分类: 技术问答 • 2022-02-27 09:14:59

控制台报错:Uncaught TypeError: Cannot read property 'value' of null

问题描述:

form表单点击提交后没动静

打开控制台发现报这样报错

Uncaught TypeError: Cannot read property 'value' of null
at HTMLFormElement. (login.js:55)
(anonymous) @ login.js:55
这是报错的行

img

img

答

打开login.js看第55行,
你是不是获取元素的值了 xxx.value
但是没获取到元素,所以.value取值报错

相关推荐

  • easyui报错 Cannot read property 'length' of null
  • Uncaught TypeError: Cannot read property 'decimalSeparator' of undefined
  • Uncaught TypeError: Cannot read property 'msie' of undefined
  • jquery.jqGrid.min.js:376 Uncaught TypeError: Cannot read property 'msie' of
  • Uncaught TypeError: Cannot read property 'length' of undefined
  • Uncaught TypeError: Cannot set property 'onclick' of null
  • ERROR:cannot read property 'getAttribute' of null 报错处理
  • 一种Uncaught TypeError: Cannot read property 'property' of undefined错误的解决办法
  • 小程序分享报错 Cannot read property 'apply' of null;at page XXX onShareAppMessage function
  • el-cascader报错,Cannot read property 'level' of null
  • Contos 设置防火墙命令
  • Uncaught TypeError: Cannot set property 'onmouseover' of undefined
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 网页学习体会    备案号:   粤ICP备20002247号