-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbgcoloradd.html
More file actions
38 lines (38 loc) · 858 Bytes
/
Copy pathbgcoloradd.html
File metadata and controls
38 lines (38 loc) · 858 Bytes
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
<html>
<body>
<form>
Enter Number ::
<input type="text" id="t1" onmousemove="show1()" onmouseout="show2()"><br>
Enter Number ::
<input type="text" id="t2" onmousemove="show3()" onmouseout="show4"><br>
<input type="button" value="OK" onclick="add()">
</form>
</body>
</html>
<script>
function show1()
{
document.getElementById("t1").style.background="pink";
}
function show2()
{
document.getElementById("t1").style.background="white";
}
function show3()
{
document.getElementById("t2").style.background="pink";
}
function show4()
{
document.getElementById("t2").style.background="white";
}
function add()
{
a=document.getElementById("t1").value;
b=document.getElementById("t2").value;
a=parseInt(a);
b=parseInt(b);
c=a+b;
document.write("Adition = "+c);
}
</script>