-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpractical_6.html
More file actions
72 lines (55 loc) · 2.48 KB
/
Copy pathpractical_6.html
File metadata and controls
72 lines (55 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#Madanraj Sagar
<html>
<title>My first resistration form...</title>
<h1> <ul><u>Registration Form</u></ul></h1>
<script>
function insert()
{
let username = document.getElementById("userName").value;
let password = document.getElementById("password").value;
if(document.getElementById("male").checked)
{
var gender = document.getElementById("male").value;
}
else
{
var gender = document.getElementById("female").value;
}
let state = document.getElementById("state").value;
let address = document.getElementById("address").value;
alert( "userName = "+ username + "\n"+ "password = " + password + "\n" +"gender = "+ gender +"\n"+"state = "+state + "\n" + "address = "+ address + "\n" +"RESISTRATION SUCCESSFULL...!");
}
function clearAll()
{
// alert("data cleared...");
}
</Script>
</head>
<body>
<form onreset = "clearAll()" onsubmit="insert()">
<fieldset>
<legend> Essential part </legend>
<label >Enter your userName : </label>
<input type = "text" name = "userName" id = "userName"></input> <br><br>
<label>Enter your password : </label>
<input type = "password" name = "password" id = "password">
</fieldset>
<br><br>
Gender :
<input type = "radio" id = "male" value ="male"> Male
<input type = "radio" id = "female" value ="female"> Female <br><br>
<label> State : </label>
<select name = "states" id ="state">
<option value = "MH">MH</option>
<option value = "AP">AP</option>
<option value = "KA">KA</option>
<option value = "TS">TS</option>
</select>
<br><br>
<label> Address : </label><br>
<textarea name = "address" id = "address" cols = "20" rows = "5"></textarea><br><br>
<input type = "submit" value ="submit" ></input>
<input type = "reset" value ="clearAll" ></input>
</form>
</body>
</html>