- document.write('<!DOCTYPE html>');
- document.write('<html lang="en">');
- document.write('');
- document.write('<head>');
- document.write(' <meta charset="UTF-8">');
- document.write(' <meta name="viewport"');
- document.write(' content="width=device-width, initial-scale=1.0">');
- document.write(' <title>Document</title>');
- document.write('</head>');
- document.write('');
- document.write('<body style="margin: 30px">');
- document.write(' <h1 style="color:green">GeeksforGeeks</h1>');
- document.write(' <h3>Multiplication using Javascript</h3>');
- document.write(' <form>');
- document.write(' 1st Number : <input type="text" id="firstNumber" /><br>');
- document.write(' 2nd Number: <input type="text" id="secondNumber" /><br>');
- document.write(' <input type="button" onClick="multiplyBy()" Value="Multiply" /><br>');
- document.write(' </form>');
- document.write('');
- document.write(' <p>The Result is : <br>');
- document.write(' <span id="result"></span>');
- document.write(' </p>');
- document.write('');
- document.write('');
- document.write(' <script>');
- document.write(' function multiplyBy() {');
- document.write(' num1 = document.getElementById(');
- document.write(' "firstNumber").value;');
- document.write(' num2 = document.getElementById(');
- document.write(' "secondNumber").value;');
- document.write(' document.getElementById(');
- document.write(' "result").innerHTML = num1 * num2;');
- document.write(' }');
- document.write(' </script>');
- document.write('</body>');
- document.write('');
- document.write('</html>');
- document.write('');
[text] multiplication
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new: