-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconcat.html
31 lines (22 loc) · 842 Bytes
/
concat.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
<html>
<head>
<title> Default HTML</title>
<script type="text/javascript">
function addValues(){
// alert("hello ");
var a = document.getElementById("t1").value;
var b = document.getElementById("t2").value;
var c=a+b;
document.getElementById("op").innerHTML="Result = "+c;
}
</script>
</head>
<body>
<input id="t1" type="text" placeholder="text 1"/>
<br><br>
<input id="t2" type="text" placeholder="text 2"/>
<br><br>
<button onclick="addValues()" id="btnAdd">Add</button>
<h2 id="op">Result = </h2>
</body>
</html>