As shownThe error reported is: cannot set property "onclick" of null at window.onload
光阴似箭催人老,日月如移越少年。
The element cannot be obtained. Set id to input
Please post the code next time;
You are using document.getElementById(), but you didn’t give the id in your HTML structure;
document.getElementById()
It is recommended to use element.getElementsByTagName(tagName)this API, this is the tag name.
element.getElementsByTagName(tagName)
The element cannot be obtained. Set id to input
Please post the code next time;
You are using
document.getElementById()
, but you didn’t give the id in your HTML structure;It is recommended to use
element.getElementsByTagName(tagName)
this API, this is the tag name.