Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- <style type="text/css">
- label
- {
- width: 100px;
- display: inline-block;
- }
- </style>
- </head>
- <body>
- <h1>Forma za kontakt</h1>
- <label>Ime</label> <input id="ime" type="text"> <br>
- <label>Prezime</label> <input id="prezime" type="text" name=""> <br>
- <label>E-mail</label> <input type="text" id = "email" name=""> <br>
- <label>Vozrast </label><select id="godini">
- <option>19</option>
- <option>20</option>
- </select>
- <br>
- <input type="button" id="btn" onclick="send()" value="SEND">
- <br>
- <input type="text" disabled="disabled" id="message">
- <script type="text/javascript">
- function send()
- {
- var name = document.getElementbyId('ime').value;
- var lastname = document.getElementbyId("prezime").value;
- var mail = document.getElementbyId('email').value;
- console.log(mail);
- var age = document.getElementbyId('godini').value;
- if(name == '' || lastname == '' || mail == '' || age =='')
- {
- alert("Site poinja se zadolzitelni");
- }
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment