User:Saurishbesu/alert.js

function add{ var num1=document.form.text1.value; var num2=document.form.text2.value; var sum=Number(num1)+Number(num2); alert("Sum of two numbers is: "+sum); } function divide{ var num1=document.form.text1.value; var num2=document.form.text2.value; var sum=Number(num1)/Number(num2); alert("Result is: "+sum); } function product{ var num1=document.form.text1.value; var num2=document.form.text2.value; var sum=Number(num1)*Number(num2); alert("Product is: "+sum); } function modulus{ var num1=document.form.text1.value; var num2=document.form.text2.value; var sum=Number(num1)%Number(num2); alert("Modulus is: "+sum); }