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