Advertisement
Guest User

Untitled

a guest
May 28th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. <body>
  2. <script>
  3.  
  4. function myFunction() {
  5. var ime = document.getElementById("ime");
  6. var emial = document.getElementById("email");
  7. var msg = document.getElementById("msg");
  8.  
  9. if (ime = " ") {
  10. document.getElementById("result").innerHTML = "Моля въведете име";
  11. }
  12. }
  13. </script>
  14.  
  15. <form>
  16.  
  17. <p id="result"> </p>
  18. <h1> Формуляр за контакти</h1>
  19.  
  20. <p> Име: *</p>
  21. <input type= "text" id="ime" placeholder="Име">
  22.  
  23. <p>Email: *</p>
  24. <input type="text" id="email" placeholder="Email">
  25.  
  26. <p>Съобщение: *</p>
  27. <textarea id="msg" placeholder="Съобщение....."> </textarea>
  28. <p></p>
  29. <button type="button" onclick='myFunction()'>Изпрати</button>
  30.  
  31.  
  32. </form>
  33. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement