What is difference between
document.getElementById(“selAge”) document.myForms.selAge
When to use which?
They are two different paths to the same goal, which one you use depends on your preference. Personally I would use document.getElementById(“selAge”) because if the structure of your HTML changes then it would still work.
document.getElementById(“selAge”)
1.4m articles
1.4m replys
5 comments
57.0k users