Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPEhtml>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8"/>
- <title>About Me</title>
- </head>
- <body>
- <form action="" id="zbir" method="post">
- <table>
- <tr>
- <td><input type="text" id="realen"></td>
- <td><input type="text" id="imaginaren"> </td>
- </tr>
- <tr>
- <td><input type="text" id="realen1"></td>
- <td><input type="text" id="imaginaren1"></td>
- </tr>
- <tr>
- <td><input type="button" value="Add" onclick="soberi()"></td>
- </tr>
- <tr>
- <td>Zbitot e :</td>
- </tr>
- <tr>
- <td><input type="text" id="Suma"></td>
- <td><input type="text" id="Suma1"></td>
- </tr>
- </table>
- </form>
- </body>
- </html>
- <script>
- function soberi() {
- r=document.getElementById("realen").value;
- r1=document.getElementById("realen1").value;
- i=document.getElementById("imaginaren").value;
- i1=document.getElementById("imaginaren1").value;
- document.getElementById("Suma").value=parseInt(r)+parseInt(r1);
- document.getElementById("Suma1").value=parseInt(i)+parseInt(i1);
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement