Please explain the piece of code below, emphasize on ./login and onsubmit keywords..
<form action="./login" onsubmit ="return validatedata()" method="post">
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is a
formtag ofHTMLlanguage. It says following things:content of this form (such as
Text BoxorRadio ButtonorCombo Boxor otherHTMLcomponent values) send to./loginurl. It is better useHttpServletRequest.getContextPath()for set relative path rather of absolute path.onsubmit ="return validatedata()"part says: When user click on submit button(with any label) before submit form to./loginurl, executevalidatedatafunction inJava Scriptfunctions, if this function not existed , user get a java script error(or other script languages).method=”post” part says: this form send with
POSTmethod . please see http://www.cs.tut.fi/~jkorpela/forms/methods.html for more information.for more information related to
formtag see : http://www.w3schools.com/tags/tag_form.asp