+ 1
Why not working?? Help! {Solved}
This code is not giving the output. https://code.sololearn.com/WrnZy7jx3m69/?ref=app
5 Respuestas
+ 3
getElementsByClassName returns a nodeList of elements having same class name. So, you need to individually select the element you need, by indexing .
Also p element doesn't have a value attribute .
correct code,
var result = document.getElementsByClassName("result")[0].textContent=ans;
}
+ 2
Thank you Abhay!!
0
But it's working
0
pallu dolu i wrote its solved
0
Okay Anas Dharar