-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsell_Buy.html
58 lines (51 loc) · 1.43 KB
/
sell_Buy.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
51
52
53
54
55
56
57
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Buyer and Seller </title>
<style>
button {
border: 2px solid yellow;
color: white;
background-color: green;
font-size: 30px;
}
button:hover {
border: 2px solid yellow;
color: yellow;
background-color: blue;
font-size: 30px;
}
#form1 {
visibility: hidden;
}
#form2 {
visibility: hidden;
}
</style>
</head>
<body>
<button onclick="onClick(this)" id="button1">Buyer</button>
<button onclick="onClick(this)" id="button2">Seller</button>
<form action="" id="form1">
<fieldset>
<legend>Personal information form 1:</legend> First name:
<br>
<input type="text" name="firstname" value="Mickey">
<br>
</form>
<form action="" id="form2">
<fieldset>
<legend>Personal information form 2:</legend> First name:
<br>
<input type="text" name="firstname" value="Mickey">
<br>
</form>
</body>
<script>
function onClick(x) {
if (x.id === 'button1') document.getElementById("form1").style.visibility = "visible";
if (x.id === 'button2') document.getElementById("form2").style.visibility = "visible";
}
</script>
</html>