Password Validation Script

This javascript will help you to validate username, password. If it will display the specified page.


  • You can generate the popup window.
  • Give the username and password.
  • If it is true, it will display the specified page.
  • Just copy the code into your page and use it.





Javascript code

<!--Script by>
<script type="text/javascript">
function login()
var username=prompt("Enter usename");
var password=prompt("Enter password");
if(username=="hiox" && password=="hioxindia")
alert("Invalid username password");
<!-- Script by -->

HTML code

<!--Script by>
<input type="button" name="login" value="Login" onclick="login()">
&copy; <a href="" style="color:#3D366F;text-decoration:none;cursor:pointer;font-size=13px"></a>
<!--Script by>
  • Release Date - 07-04-2008
  • Get free version without ©copyright link for just $5/-
  • For customization of this script or any script development, mail to


  • Copy the javascript code into the head part of your HTML page.
  • Create the HTML form using the above HTML code.
  • Generate the popup window and then give the username, password.
  • The function login() is used to generate the popup window and then check the username, password. If you give correct username and password the specified page will be displayed.


  • The javascript (misspelled as java script) is given under GPL License.
  • i.e. Free use for those who use it as it is.
  • Free, if your modification does not remove our copyright information and links.
  • Detailed License information can be found here.
  • You can purchase the script if your requirements does not meet GPL License terms.

Related Scripts

Free Javascript Scripts