- <!DOCTYPE html>
- <html>
- <head>
- <title>Uppgift Javascript, Rexi Flatöe</title>
- <meta charset="utf-8"/>
- <script type="text/javascript">
- function addTwoNumbers(textBox1, textBox2){
- var x=document.getElementById(textBox1).value;
- var y=document.getElementById(textBox2).value;
- var sum=0;
- sum=Number(x)+Number(y);
- alert("Summan är: " + sum);
- }
- </script>
- </head>
- <body>
- <h2>Addera två nummer.</h2>
- <b>Skriv första numret: </b><br>
- <input type="text" id="textIn1"/><br>
- <b>Skriv andra numret: </b><br>
- <input type="text" id="textIn2"/><br><br>
- <input type="button" id="btnSum" value="Räkna ut" onClick="addTwoNumbers('textIn1','textIn2')"/>
- </body>
- </html>
[text] Very complicated
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: