If you enter 2 numbers in 2 fields, addition and multiplication will be displayed at the same time. After execution, he has to write e.g. Adding: (result of addition) Multiplication (result of multiplication) with one button . How to make from this code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form name="frmadd">
Number 1<input type ="text" name="txt1" ><br>
Number 2<input type ="text" name="txt2" ><br>
addition :<input type ="text" name="txt3" disabled><br>
multiplication :<input type ="text" name="txt4" disabled><br>
<input type="button" value="Add" name="but1" onClick="addNum()">
</form>
<script>
function addNum()
{
num1=parseInt(document.frmadd.txt1.value);
num2=parseInt(document.frmadd.txt2.value);
num3=num1+num2;
num4=num1*num2;
document.frmadd.txt3.value=num3;
document.frmadd.txt4.value=num4;
}
</script>
</body>
</html>