SHARE
TWEET

Untitled

a guest Aug 12th, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function alertbox()
  5. {
  6. var test=prompt("Input your name please","")
  7. if (test!=null && test!="")
  8. {
  9. alert("Thanks")
  10. }
  11. else if (test==null)
  12. {
  13. test2=confirm("You are about to cancel this, press ok to continue, or press cancel to go back and input your name!")
  14. if (test2==false)
  15. {
  16. alertbox()
  17. }
  18. }
  19. else if (test=="")
  20. {
  21. alert("Please put a name in the text field!")
  22. alertbox()
  23. }
  24. }
  25. </script>
  26. </head>
  27. <input type="button" onclick="alertbox()" value="Press Me!" />
  28. </body>
  29. </html>
RAW Paste Data
Top