Prev Demo
JavaScript
>
Division Remainder
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Title</title> </head> <body> <h1>Division Remainder</h1> <script type="text/javascript"> function DivisionRemainder() { 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="btnDivisionRemainder" value="Submit" onclick="DivisionRemainder()" /> </body> </html>
Note: We DO NOT save your trial code in our database.
Output