Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html lang="pl">
- <html>
- <head>
- <meta charset="utf-8">
- <script>
- function licz()
- {
- var s,a,b,c,d,e;
- s=0;
- a=parseFloat(document.getElementById("pole").value);
- b=parseFloat(document.getElementById("pole2").value);
- c=parseFloat(document.getElementById("pole1").value);
- d=parseFloat(document.getElementById("pole21").value);
- e=parseFloat(document.getElementById("pole23").value);
- s=a+b+c+d+e;
- alert(s);
- }
- </script>
- </head>
- <body>
- <input type="text" id="pole"/>
- <input type="text" id="pole2"/>
- <input type="text" id="pole1"/>
- <input type="text" id="pole21"/>
- <input type="text" id="pole23"/>
- <input type="text" id="wynik"/>
- <button onClick="licz()">dodaj</button>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement