Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="pl">
- <head>
- <meta charset="utf-8" />
- <script>
- function sprawdz() {
- var liczba = document.getElementById("pole").value;
- if (liczba > 0) {
- document.getElementById("wynik").innerHTML = "dodatnia";
- }
- else if (0 > liczba) { document.getElementById("wynik").innerHTML = "ujemna"; }
- else
- document.getElementById("wynik").innerHTML = "0";
- }
- </script>
- </head>
- <body>
- <input type="text" id="pole" required>
- <input type="submit" onclick="sprawdz()" />
- <div id="wynik">
- </div>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement