ivanakarpuzova

Untitled

Nov 3rd, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title></title>
  5.  
  6. <style type="text/css">
  7. label
  8. {
  9. width: 100px;
  10. display: inline-block;
  11. }
  12. </style>
  13. </head>
  14. <body>
  15.  
  16. <h1>Forma za kontakt</h1>
  17.  
  18. <label>Ime</label> <input id="ime" type="text"> <br>
  19. <label>Prezime</label> <input id="prezime" type="text" name=""> <br>
  20. <label>E-mail</label> <input type="text" id = "email" name=""> <br>
  21. <label>Vozrast </label><select id="godini">
  22. <option>19</option>
  23. <option>20</option>
  24. </select>
  25. <br>
  26. <input type="button" id="btn" onclick="send()" value="SEND">
  27. <br>
  28. <input type="text" disabled="disabled" id="message">
  29.  
  30. <script type="text/javascript">
  31. function send()
  32. {
  33. var name = document.getElementbyId('ime').value;
  34. var lastname = document.getElementbyId("prezime").value;
  35. var mail = document.getElementbyId('email').value;
  36. console.log(mail);
  37. var age = document.getElementbyId('godini').value;
  38.  
  39. if(name == '' || lastname == '' || mail == '' || age =='')
  40. {
  41. alert("Site poinja se zadolzitelni");
  42. }
  43.  
  44.  
  45. }
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52. </script>
  53.  
  54.  
  55. </body>
  56. </html>
Advertisement
Add Comment
Please, Sign In to add comment