Kindly Note that Ignore Issues at the time of program execution. All programs are reference only.
13.Write a JavaScript Program to accept user name and password
from an user, if Username and Password is same then display his score card on
the next page as shown below.
    
       login.html
  <html>
  <head>
  <script
type="text/javascript">
 function
fun1()
 {
 var
u=document.f1.t1.value
 var
p=document.f1.t2.value
 if(u=="asha"&&p=="asha")
 window.alert("login");
 if(u!="asha")
 window.alert("Invalid
username");
 if(p!="asha")
 window.alert("Invalid
password");
 }
 </script>
  </head>
<form
name="f1" action="one.html">
<table
border="1">
<tr>
<td>login</td>
<td><Input
type="text" name="t1"></td>
</tr>
<tr>
<td>password</td>
<td><Input
type="password" name="t2"></td>
</tr>
<tr>
<td></td>
<td><Input
type="submit" value="submit"
onclick="fun1()"></td>
</tr>
</form>
</body>
</html>
One.html
<html>
<body>
<center><h1>Foresight College</h1></center>
<center><h3>Name
of the Student :Adhira Ranjegaonkar  Seat
No.1234</h3></center>
<hr>
<center>
<table
border=1>
<tr>
<td>Sr.No</td>
<td>Subject</td>
<td>External
Exam(out of 80)</td>
<td>Internal
Exam(out of 20)</td>
<td>Total
Marks (out of 100)</td>
<td>Result</td>
</tr>
<tr>
<td>501</td>
<td>core
java</td>
<td>56</td>
<td>15</td>
<td>71</td>
<td>Pass</td>
</tr>
<tr>
<td>502</td>
<td>Web
Technology</td>
<td>67</td>
<td>18</td>
<td>85</td>
<td>Pass</td>
</tr>
</table>
<center>
</body>
</html>
 




