Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang='cs'>
- <head>
- <title></title>
- <meta charset='utf-8'>
- <meta name='description' content=''>
- <meta name='keywords' content=''>
- <meta name='author' content=''>
- <meta name='robots' content='all'>
- <!-- <meta http-equiv='X-UA-Compatible' content='IE=edge'> -->
- <link href='/favicon.png' rel='shortcut icon' type='image/png'>
- <script>
- function Oblicz() {
- var liczba1 = parseInt(document.forms["form1"].liczba1.value);
- var liczba2 = parseInt(document.forms["form1"].liczba2.value);
- var liczba3 = parseInt(document.forms["form1"].liczba3.value);
- var policzone = (liczba1 * liczba2 * liczba3);
- var niepoliczone = "Blad!";
- document.getElementById("wynik").innerHTML = policzone;
- if (liczba1 <= 0 || liczba2 <= 0 || liczba3 <= 0)
- document.getElementById("wynik").innerHTML = niepoliczone;
- }
- </script>
- </head>
- <body>
- <form id="form1" name="form1">
- Podaj a: <input type="text" name="liczba1" /></p>
- Podaj b: <input type="text" name="liczba2" /></p>
- Podaj c: <input type="text" name="liczba3" /></p>
- <button onclick="Oblicz()">Oblicz</button> <button type="reset">Wyczysc</button>
- </form>
- <div id="wynik"></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement