标签:body uncaught can java element var erro highlight event
<script type="text/javascript"> var body1=document.getElementById(‘#body‘) </script>
错误提示:
Uncaught TypeError: Cannot read property ‘addEventListener‘ of null
修改代码如下:
<script type="text/javascript"> var body1=document.getElementById(‘body‘) </script>
成功
Uncaught TypeError: Cannot read property 'addEventListener' of null
标签:body uncaught can java element var erro highlight event
原文地址:https://www.cnblogs.com/chargeworld/p/10015171.html