+ 3

Why innerHTML isn't work?

Do any one can tell me why this code is not working and tell solution. https://code.sololearn.com/WS39Qq9367wy/?ref=app

26th Jul 2020, 3:49 PM
Bereket
Bereket - avatar
4 Antworten
+ 8
1. Spelling mistake not getElenentById, should be getElementById 2. JS tab scripts are put in <head>, before the DOM in <body> is loaded. Solution is: window.onload = function() { //.... your get element scripts.... } function clickEventCallbacks(){ .... } 3. a fix for you https://code.sololearn.com/WY0fv3ZNztBz/?ref=app
26th Jul 2020, 3:51 PM
Gordon
Gordon - avatar
+ 3
clear() would not call clear function Use other function name, if you really want to call clear function, use window.clear() https://code.sololearn.com/WHV0l2FXj3MI/?ref=app
26th Jul 2020, 4:03 PM
Calviղ
Calviղ - avatar
+ 2
Tnx so much🙏🙏🙏🙏
26th Jul 2020, 6:13 PM
Bereket
Bereket - avatar
+ 1
Calviղ 's answer is best. My edit is not fully correct.
26th Jul 2020, 4:10 PM
Gordon
Gordon - avatar