Html Form validation using one function of javascript

<script type="text/javascript"> function validateform() { var txtcontrols = document.getElementsByTagName("input"); for (var count = 0; count &lt; txtcontrols.length; count++) { if (txtcontrols[count].value == '') { errmsg.innerHTML = "Please Enter " + txtcontrols[count].name; return false; } if (txtcontrols[count].getAttribute('type') == 'radio') { var counter = 0; var radiobuttons = document.getElementsByName(txtcontrols[count].name); for (var radio = 0; radio &lt; radiobuttons.length; … Continue reading Html Form validation using one function of javascript