Guest User

Untitled

a guest
Jan 17th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <input type="text" id="formcheck" class="contact" maxlength="255" />
  2.  
  3. <input type="text" id="formcheck" class="contact" maxlength="255" value="Blue"/>
  4. <input type="button" id="clickB" value="click me">
  5.  
  6. $("#clickB").click(function(){
  7. if (document.getElementById('formcheck').value != 'Blue') {
  8. alert('Please enter the correct word.');
  9. document.getElementById('formcheck').focus();
  10. return false;
  11. }
  12. })
  13.  
  14. if (f.formcheck.value != 'Blue') {
  15. alert('Please enter the correct word.')
  16. f.formcheck.focus()
  17. return false
  18. }
  19.  
  20. if (f.formcheck.value != 'Blue') { alert('Please enter the correct word.'); f.formcheck.focus(); return false; }
Add Comment
Please, Sign In to add comment