As shown
The error reported is: cannot set property "onclick" of null at window.onload
PHP中文网2017-05-19 10:42:17
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.