Design Login page by using HTML and Javascript:

Open Notepad --> write the following code --> Save with login.js

<script type="text/javascript" language="javascript">

function validate()

var name=document.getElementById("user").value;

var pwd=document.getElementById("pwd").value;

if(name=='java' && pwd=='123')
alert('Login success');
alert('Login failed');

<input type="text" id="user"/><br/>
<input type="text" id="pwd"/>

<input type="button" value="login" onclick="validate()">

save with login.js and you will get one javascript icon on your system, open with browser and run it

1 comment:

  1. so this code is ok but how to validate username and password and also how to connect the oracle database to this code