解决参考:https://bbs.csdn.net/topics/390628759

步枯:“很明显,取id没取到。。。仔细检查一下id定义是否正确”

支付宝加好友偷能量挖:var obj = document.getElementById("c_message_content") 对象不存在咯

 

我的问题:

在学习js的时候,看todolist源码http://www.todolist.cn/,然后copy下来后运行会有报错:

`Uncaught TypeError: Cannot read property 'setSelectionRange' of null`

然后,参考博客后查看源码,是函数edit中多了个空格,getElementById获取不到正确的id,去掉后就好了。

 

Uncaught TypeError: Cannot read property 'setSelectionRange' of null

 

相关文章:

  • 2021-06-06
  • 2022-12-23
  • 2021-12-22
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2021-07-26
  • 2021-10-10
猜你喜欢
  • 2022-01-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
相关资源
相似解决方案