Answers for "jquiry code that handles addition in a way that the two values you enter in the addition form are also passed to the newly created division form and both the sum and division results are calculated and displayed when the addition form is submitted."

0

calculate two number and diplay next field without reload the page javascript

var text1 = document.getElementById("Text1");
var text2 = document.getElementById("Text2");

function add_number() {
   var first_number = parseFloat(text1.value);
   if (isNaN(first_number)) first_number = 0;
   var second_number = parseFloat(text2.value);
   if (isNaN(second_number)) second_number = 0;
   var result = first_number + second_number;
   document.getElementById("txtresult").value = result;
}
Posted by: Guest on September-03-2020
-1

calculate two number and diplay next field without reload the page javascript

<p>Enter First Number :</p>
<br>
<input type="text" id="Text1" name="TextBox1" oninput="add_number()">
<br> <p>Enter Second Number :</p>
<br>
<input type="text" id="Text2" name="TextBox2" oninput="add_number()">
<br>Result :
<br>
<input type="text" id="txtresult" name="TextBox3">
Posted by: Guest on September-03-2020

Code answers related to "jquiry code that handles addition in a way that the two values you enter in the addition form are also passed to the newly created division form and both the sum and division results are calculated and displayed when the addition form is submitted."

Code answers related to "Javascript"

Browse Popular Code Answers by Language