Uncaught TypeError: Cannot read property 'getAttribute' of null
The error line is shown in the third line of this code.
Code
vara=param.getAttribute("a");
varb = document.getElementById(a);
varc_class = b.getAttribute("class");
I am using jquery.
I wonder what it is because only certain users have errors.
What does this mean?
Is it correct that the contents of the getAttribute function in the third line are null?
I modified the code a little, but it looks like this.
javascript jquery
In the first line, getAttribute("a") is trying to retrieve the value of the "a" attribute, although it is unclear what param is.If param is an element, does the a attribute exist?
If it does not exist, it returns null, so it seems that there is no attribute itself.
623 Uncaught (inpromise) Error on Electron: An object could not be cloned
576 Who developed the "avformat-59.dll" that comes with FFmpeg?
922 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.