+ 1

I can not understand the reason. Gives an error message. What's wrong?

When I select the size, I get an error, I can not understand why. https://code.sololearn.com/Wku29nGV13pc/?ref=app

31st Mar 2018, 11:50 AM
Вика
Вика - avatar
2 odpowiedzi
+ 2
You never made an element with the ID showWidth
31st Mar 2018, 12:33 PM
Ariela
Ariela - avatar
+ 2
<div> <button onclick='clearCanvas()'>CLEAR</button> <button id='ERASER' onclick='changeColor("white")' ontouchstart='changeColor("while")' onclick='clearCanvas()'>ERASER</button> <div>Width: <span id="showWidth">40</div> </span></div>
31st Mar 2018, 12:36 PM
Emma