-
Notifications
You must be signed in to change notification settings - Fork 0
/
6.forms.html
50 lines (49 loc) · 1.42 KB
/
6.forms.html
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
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Forms example..</title>
</head>
<body>
<div>
<form action="">
<textarea name="" id="" cols="30" rows="10">Tis is text area
</textarea>
<br>
<br>
<select>
<option> Select any tech langyage</option>
<option> Java</option>
<option> SQL</option>
<option> Php</option>
<option> java script</option>
</select>
<br>
<br>
<input type="radio" name="gender"/>Male
<input type="radio"name="gender"/>Female
<br>
<br>
<input type="checkbox" name="gen"onclick="valOne(this)"/>M
<input type="checkbox" name="gen"onclick="valOne(this)"/>F
<br>
<br>
<input type="text" placeholder="Email"/>
<br>
<br>
<input type="submit" value="Click here">
</form>
<p>¥£</p>
</div>
</body>
<script>
function valOne(checkbox){
var checkboxs=document.getElementsByName("gen")
checkboxs.forEach((item)=>{
if(item!==checkbox)
item.checked=false
})
}
</script>
</html>