-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascript practice.html
More file actions
152 lines (145 loc) · 5.6 KB
/
javascript practice.html
File metadata and controls
152 lines (145 loc) · 5.6 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html>
<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">
<link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>
<header>
<h1>JavaScript Projects</h1>
</header>
<article>
<div id="project_1">
<h1>Project 1: Currency conversion</h2>
<p>converting <span class="Nig"> Nigeria </span>Naira to <span class="US">United State</span> Dollar</p>
<p>current exchange rate <span id="rate"></span></p>
<div class="currency">
<div>
<input type="text" id="currency1">
</div>
<div class="curbtn">
<button class="naira" onclick="dollarToNaira()"> Dollar to Naira </button>
<button class="dollar" onclick="nairaToDollar()">Naira to Dollar</button>
</div>
</div>
<div id="currency">
<p id="yourTotalAmount"></p>
</div>
<P class="note">Note: Black-market usually have an increse between 20 to 40%</P>
</div>
</article>
<!-- ======project 2 -->
<article>
<div id="project_2">
<div class="project_head">
<h1>Project 2:Random Color Picker </h1>
<p>Choosing Random Color</p>
<div class="buttons" id="buttons">
<button class="btn green" value="green"></button>
<button class="btn yellow" value="yellow"></button>
<button class="btn gold" value="gold"></button>
<button class="btn red" value="red"></button>
<button class="btn blue" value="blue"></button>
</div>
</div>
<p id="color"></p>
<button class="resetcolor" onclick="resetBgcolor()">Reset Baground-Color</button>
</div>
</article>
<!-- ======project 3 =======-->
<article>
<div id="project_3">
<div>
<h1>PROJECT 3</h1>
<h2>Know the total days in your birth month</h2>
</div>
<label for="birthMonth">Select your birth month</label>
<select id="birthMonth" onchange="getbirthmonth()">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
<div>
<p id="yourBirthMonthIs"></p>
</div>
</div>
<div>
<h2>Bonus</h2>
<h2>Know the Average Salary of your Educational Qualification</h2>
<div>
<select id="eduQualification" onchange="showSalary()">
<option value="noHighSchool">No high school diploma</option>
<option value="highSchool ">High school diploma</option>
<option value="Associate">Associate's degree</option>
<option value="Bachelor">Bachelor's degree</option>
<option value="Master">Master's degree</option>
<option value="Professional">Professional degree</option>
<option value="Doctoral">Doctoral degree</option>
</select>
<div>
<p id="salary"></p>
</div>
</div>
</div>
</div>
</article>
<article>
<div class="project4">
<h1>Project 4: Mini Calculator</h1>
<div class="calculator">
<div class="box">
<div class="row" class="values">
<input type="text" id="n1" placeholder="number1">
<input type="text" id="n2" placeholder="number2">
</div>
<div class="row" id="operators">
<button class="operator" value="+">+</button>
<button class="operator" value="-">-</button>
<button class="operator" value="/">/</button>
<button class="operator" value="*">*</button>
<button id="calc" class="ansbtn" onclick="calculate()">=</button>
</div>
</div>
<input type="text" id='answer' placeholder="Answer">
</div>
</div>
</article>
<article>
<div>
<h1>project 5</h1>
<div>
<h1>Score and your Prize</h1>
<p>click your score to get a price</p>
</div>
<div>
<select id="list" onchange="getSelectedValue();">
<option value="1">Good</option>
<option value="2">very Good</option>
<option value="3">Excelent</option>
<option value="4">Exeptional</option>
</select>
</div>
<div id="myPrize"></div>
</div>
<div class="bunus">
<h1>Bunus</h1>
<h2>Play to Win</h2>
<button onclick="generateNumber()" class="rdnbtn">Click to win</button>
<p>you just win <span class="Randomnumber" id="RandomNumber"></span> Million Dollars</p>
</div>
<script src="javascript practice.js"></script>
</body>
</html>