1 | <input type="text" name="date" /> |
Say an input field with the name “date” had to be validated at runtime:
1 | document.getElementsByName("date")[0]. |
2 | addEventListener("change", validateDate, false); |
3 |
4 | function validateDate(){ |
5 | // Do something when the content of the 'input' element with the name 'date' is changed. |
6 | } |