Javascript : Add , Subtract , Multiply and Divide Two Number

preview_player
Показать описание
The tutorial Add , Subtract , Multiply and Divide Two Number from two textbox and display the result in third text box using JavaScript
Рекомендации по теме
Комментарии
Автор

Omg thank you so much, i have been researching all day until I found this! It works super well!! ❤️❤️❤️

ANGELA-sefl
Автор

Wow thanku so much . Jo chahate the wahi mujhe yahan mila . I m so happy...

Lucknow.
Автор

THANK you so much Sir my Calculator is Working

Arifansari-nqby
Автор

Thank you mam😘
This helped me a lot👍👍

Suraj
Автор

<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
input[type=text]
{
border:2px solid blue;
}
input[type=button]
{
background-color: skyblue;
color:red;
}
</style>
</head>

<body>
<br><br>
<form name="myform">
<input type="text" name="fst"><br><br>
<input type="text" name="snd"><br><br>
<input type="button" name="" value="ADD" onclick="add()"><br><br>
<input type="button" name="" value="SUB"
<input type="button" name="" value="MUL"
<input type="button" name="" value="DIV" onclick="divide()"><br><br>


<input type="text" name="result">



</form>

<script type="text/javascript">
function add(){


result=fst+snd;
myform.result.value=result;
}

function subtract() {


result=fst-snd;
myform.result.value=result;
}

function multiply(){


result=fst*snd;
myform.result.value=result;
}
function divide(){


result=fst/snd;
myform.result.value=result;
}
</script>

</body>
</html>

EducationalWorld
Автор

Would you please send me HTML code for add one value and get multiple result means
If I add a number 5 I want results just one click.
1. 5+a number= result1
2. Result1*2=result2
3.result2-6=result3 and
4. result3+9=result4

PremBhatia
Автор

How to do everything by using only one function

amanchandra
Автор

Are bhaisahab dikhai to de ni rha hai .. Pdh Kya rhe hai app...

richasingh