0

Hello guys it alaways says that there is no method for #<html document>. 'getElementById' what should I do?

7th Feb 2017, 4:31 PM
Dipak Jadhav
Dipak Jadhav - avatar
2 Answers
0
document.getElementById("tag_id") You have to say what you want to do. Type: document.getElementById('tag_id').value //Capture the value
7th Feb 2017, 9:20 PM
JĂ´natas Araripe
JĂ´natas Araripe - avatar
0
this is the program guys <!DOCTYPE html> <html> <head></head> <body> <div class="hello"> This doesn't work!!!!! </div> </body> <script type="text/javascript"> var a= document.getElementsByClassName("hello"); a.style.color="red"; </script> </html>
8th Feb 2017, 2:34 AM
Dipak Jadhav
Dipak Jadhav - avatar