Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <head>
- <meta charset="UTF-8" />
- <title>05</title>
- </head>
- <body>
- <script>
- function licz(formularz) {
- if(formularz.a.value==""|formularz.b.value==""|formularz.c.value=="")
- alert("Wprowadź dane");
- else{
- a=formularz.a.value;
- b=formularz.b.value;
- c=formularz.c.value;
- formularz.o.value=a+b+c;
- }
- }
- </script>
- <form name="formularz">
- Podaj bok a: <input type="text" name="a"><br><br>
- Podaj bok b: <input type="text" name="b"><br><br>
- Podaj bok c: <input type="text" name="c"><br><br>
- <input type="button" value="Oblicz" onClick="licz(this.form)"><br><br>
- Wynik:<br><br>
- Obwód trójkąta: <input type="text" name="o"><br><br>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement