<form id="form1">
<table style="border:1px solid black ; font-family : Arial">
<tr>
<td>
First Number
</td>
<td>
<input id="Text1" type="text"/>
</td>
</tr>
<tr>
<td>
Second Number
</td>
<td>
<input id="Text2" type="text"/>
</td>
</tr>
<tr>
<td>
Resut
</td>
<td>
<input id="ResultArea" type="text"/>
</td>
</tr>
<tr>
<td>
<input id="AddButton" type="button" value="Add" onclick="add()" />
</td>
</tr>
</table>
</form>
I am making simple program through JavaScript in which user are able to input 2 numbers and by clicking add button he will get the sum of those two inputs. For this purpose i have two input fields for first and second input, one input field is for display the result after sum and also have one add button. So here it is my java script function.
function add() {
var FirstNumber = document.getElementById("Text1").Value
var SecondNumber = document.getElementById("Text2").Value
document.getElementById("ResultArea").Value = FirstNumber + SecondNumber;
}
I don't know whats the problem but it is not working anyways . when give input and click on add button , there is no response , no error , nothing ..