Advertisement
tei123

Untitled

Sep 23rd, 2016
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <html lang="pl">
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <script>
  6. function licz()
  7. {
  8. var s,a,b,c,d,e;
  9. s=0;
  10. a=parseFloat(document.getElementById("pole").value);
  11. b=parseFloat(document.getElementById("pole2").value);
  12. c=parseFloat(document.getElementById("pole1").value);
  13. d=parseFloat(document.getElementById("pole21").value);
  14. e=parseFloat(document.getElementById("pole23").value);
  15. s=a+b+c+d+e;
  16. alert(s);
  17. }
  18. </script>
  19. </head>
  20. <body>
  21.  
  22. <input type="text" id="pole"/>
  23. <input type="text" id="pole2"/>
  24. <input type="text" id="pole1"/>
  25. <input type="text" id="pole21"/>
  26. <input type="text" id="pole23"/>
  27. <input type="text" id="wynik"/>
  28.  
  29. <button onClick="licz()">dodaj</button>
  30.  
  31. </body>
  32. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement