Back to Tutorial Paste Your Code here! <!DOCTYPE html> <html> <head> <title>How to Convert Binary to Decimal Using Javascript With HTML Input Form?</title> </head> <body> <form method="post"> Input Bin Val :- <input type="text" id='myText' name="dec"> <button type="button" value="Convert" onclick="Convert()" class="btn btn-success btn-send">Convert</button> <p id="demo"></p> </form> <script> function Convert() { var x = document.getElementById("myText").value; document.getElementById("demo").innerHTML = parseInt(x, 2); } </script> </body> </html> Output