Advertisement
Guest User

Untitled

a guest
Nov 18th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <html lang="pl">
  2. <head>
  3. <script type="text/javascript">
  4. function eurazjer(){
  5. var a = document.getElementById("polea").value;
  6. a = parseInt(a);
  7. var b = document.getElementById("poleb").value;
  8. b = parseInt(b);
  9. var wynik=(a*a)+(2*a*b)+(b*b)
  10. document.getElementById("pies").innerHTML=("Wynik to: "+wynik+".");
  11. }
  12. </script>
  13. <meta charset="UTF-8"/>
  14. </head>
  15.  
  16. <body>
  17. Podaj A:</br>
  18. <input type="text" id="polea" name="" /></br>
  19. Podaj B:</br>
  20. <input type="text" id="poleb" name=""/></br>
  21. <input type="text" id="wzór" value="a^2+(2*a*b)+b^2" disabled/>
  22. <input type="submit" value="Oblicz" onclick="eurazjer()"/></br>
  23. <div id="pies"></div>
  24. </body>
  25. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement