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