+ 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
4 Respuestas
+ 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
+ 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
+ 2
Tnx so much🙏🙏🙏🙏
+ 1
Calviղ 's answer is best.
My edit is not fully correct.