I have a quick question. I am learning how to make a registration form using javascript and found this link very helpful.
http://www.w3resource.com/javascript/form/javascript-sample-registration-form-validation.php
I understand everything in the code except for this line in the html page…
<body onload="document.registration.userid.focus();">
I know it is saying that when the page is loaded run this javascript function, but I don’t understand what each part does. If someone could please explain this to me I would greatly appreciate it.
This means when the page is loaded set the focus on to the
useridfield in the form namesregistrationin thedocumentYou can use
This asks to select the field named
useridin thedocument. So we can make it free of Form name