Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <head>
  3. <meta charset="UTF-8" />
  4. <title>05</title>
  5. </head>
  6. <body>
  7. <script>
  8. function licz(formularz) {
  9. if(formularz.a.value==""|formularz.b.value==""|formularz.c.value=="")
  10. alert("Wprowadź dane");
  11. else{
  12. a=formularz.a.value;
  13. b=formularz.b.value;
  14. c=formularz.c.value;
  15. formularz.o.value=a+b+c;
  16. }
  17. }
  18. </script>
  19. <form name="formularz">
  20. Podaj bok a: <input type="text" name="a"><br><br>
  21. Podaj bok b: <input type="text" name="b"><br><br>
  22. Podaj bok c: <input type="text" name="c"><br><br>
  23. <input type="button" value="Oblicz" onClick="licz(this.form)"><br><br>
  24. Wynik:<br><br>
  25. Obwód trójkąta: <input type="text" name="o"><br><br>
  26. </form>
  27. </body>
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement