Prev Demo
JavaScript
>
Multiply
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Title</title> </head> <body> <h1>Multiplication</h1> <script type="text/javascript"> function Multiply() { var a = document.getElementById("txtA").value; var b = document.getElementById("txtB").value; var result = parseInt(a) * parseInt(b); alert(result); } </script> Enter two digit: <input type="text" id="txtA" name="txtA" /> * <input type="text" id="txtB" name="txtA" /> <input type="button" name="btnMultiply" value="Submit" onclick="Multiply()" /> </body> </html>
Note: We DO NOT save your trial code in our database.
Output