+ 1

Error with document.getElementById() in js

i get alwas error when i Use document.getElementById().onclick=function js does not understand (onclick) anybody know why?

15th May 2017, 7:20 AM
Ashraf Beshtawi
Ashraf Beshtawi - avatar
2 Answers
+ 8
You can add event Listener to element like this. https://code.sololearn.com/WT99P8CJ364K
15th May 2017, 10:59 AM
êč€ì •ì œ(Legacy)
êč€ì •ì œ(Legacy) - avatar
+ 4
Ummmmm You mean error with undefined value? Or the problem like as @Daryl Ferror Legion said?
15th May 2017, 10:46 AM
Yanothai Chaitawat
Yanothai Chaitawat - avatar