Html code for validating name

So you’ve written a few HTML pages, and they seem to display ok to you, but there are a few things not quite right with them.

We will using one easy function for password validation in this file Using custom JS we can apply own validation methods for custom elements.

In our example, we have a login form with two input fields i.e.

username and password, As user clicks on login button, Java Script validation function comes into act.

In Java Script, authors may use a backslash to prevent the string from being parsed as markup: , authors must also take care when using start tags within a script element.

For details, see the Script and Style elements section of the XHTML 1.0 Recommendation as well as the HTML compatibility guideline for embedded scripts.