Uncaught TypeError: Cannot set property 'value' of null

前端 未结 8 929
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-05 07:58

I\'m trying to pass the entered text to the controller using an ajax request. But i\'m getting athe error \"Uncaught TypeError: Cannot set property \'value\' of null \" whe

8条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-05 08:29

    It seems to be this function

    h_url=document.getElementById("u").value;
    

    You can help yourself using some 'console.log' to see what object is Null.

提交回复
热议问题