Ask coding questions

← Back to all posts
TypeError while changing button content
RixTheTyrunt

I tried to change the content of buttons while doing a Drawer ( my screen lock ( <<:P) ) and got:

Uncaught TypeError: Cannot set properties of null (setting 'innerText')
at changeContent (script.js:15)
at HTMLButtonElement.onclick ((index):12)

And also ( weirdly ) :

Failed to load resource: the server responded with a status of 404 ()

Voters
RixTheTyrunt
Comments
hotnewtop
MrVoo

Your function looks like it has quotes inside, and the function only takes a number