-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtrial1.php
67 lines (63 loc) · 1.45 KB
/
trial1.php
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
<!Doctype HTML>
<html>
<head>
<style>
button {
border:none;
height:40px;
width:80px;
color:white;#333333
text-align:center;
background-color:#333333;
transition: background-color 0.2s;
}
button:hover {
cursor:pointer;
background-color:#111111;
}
button:active {
background-color:white;
color:black;
}
body {
background-color:powderblue;
margin:0;
}
#topnav {
height:40px;
width:100%;
position:fixed;
margin-top:0px;
background-color: #333333;
opacity:0.8;
overflow:hidden;
}
</style>
</head>
<body>
<div id="topnav">
<a href="https://www.magicbricks.com/"><button>Home</button></a>
<a href="https://www.youtube.com/watch?v=yzshoDMBkqE"><button>News</button></a>
<button>Contact</button>
<button>About</button>
</div>
<br><br><br>
<input type="text" id="num1">
<input type="text" id="num2" >
<button onclick="func()">sum</button>
<Script>
var a=document.getElementById('num1').value;
var b=document.getElementById('num2').value;
function func(){
var a=parseInt(document.getElementById('num1').value);
var b=parseInt(document.getElementById('num2').value);
s=a+b;
document.getElementById('demo').innerHTML=s;
}
</Script>
<p id="demo"></p>
<script>
document.getElementById('demo').innerHTML=s;
</script>
</body>
</html>