Web Technologies

Web Technologies 

Slip13

Q.1) 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. [Marks 30] 

Solution

head.html
<html>
<body>
<h1>Abhinav Education Society</h1>
</body>
</html>

login.html
<html>
<head>
<script>
function validate()
{
var username=document.getElementById("username").value;
var password=document.getElementById("password").value;
if(username=="vivek"&&password=="vivek")
window.alert("login");
if(username!="vivek")
window.alert("Invalid username");
if(password!="vivek")
window.alert("Invalid password");
}
</script>
</head>
<body>
<form method="get" name="loginform" action="marksheet.html">
<table>
<tr>
<td>username</td>
<td><input type="text" name="username" id="username"></td>
</tr>

<tr>
<td>password</td>
<td><input type="text" name="password" id="password"></td>
</tr>

<tr>
<td></td>
<td><input type="submit" value="sumbit" onclick="validate()"></td>
</tr>
</table>
</form>
</body>
</html>

marksheet.html
<html>
<body>
<h1 align="center" forecolor="red">Abhinav Education society</h1>
<h2 align="center">Student name is vivek </h2>
<table border=2 align="center" backcolor="red">
<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>vb.net</td>
<td>56</td>
<td>15</td>
<td>71</td>
<td>Pass</td>
</tr>

<tr>
<td>502</td>
<td>web tech</td>
<td>67</td>
<td>18</td>
<td>85</td>
<td>Pass</td>
</tr>

<tr>
<td>503</td>
<td>core java</td>
<td>70</td>
<td>20</td>
<td>89</td>
<td>Pass</td>
</tr>

<tr>
<td>504</td>
<td>oose</td>
<td>52</td>
<td>15</td>
<td>67</td>
<td>Pass</td>
</tr>
</table>
<h3 align="center">Exam Date=oct2014</h3>
</body>
</html>

name.html
<html>
<body>
<h1>Abhinav Education society</h1>
<h2>Name of the Student Vivek</h2>
</body>
</html>
BCA Pratical Solution

My name is Vivek And I from Mumbai and Complete my Graduation Bca.my Age is 23 Years.

Post a Comment

Previous Post Next Post