Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Treeside Holidays</title>
  6. </head>
  7.  
  8. <body>
  9. <h1>Treeside Holidays</h1>
  10. <p>Please enter your details. Treeside holidays will automatically generate your username from your details.</p> Please enter a password for your account.</p>
  11.  
  12.  
  13. <p>First name: <input type="text" id="fname" /></p>
  14. <p>Surname: <input type="text" id="sname" /></p>
  15. <p>Date of birth: <input type="text" id="dob" /> (Please enter as dd/mm/yyyy)</p>
  16. <button onclick="user()">Generate Username</button>
  17.  
  18.  
  19.  
  20. <p>Please enter a password for your account.</p>
  21. <p>Enter password: <input type="text" id="password1" /></p>
  22. <p>Re-enter password: <input type="text" id="password2"/></p>
  23. <button onclick="password()">Submit Password</button>
  24. <p> Username: <input type="text" id="user" /> </p>
  25. <script>
  26.  
  27. function user(){
  28. var name = document.getElementById("fname").value;
  29. var surname = document.getElementById("sname").value;
  30. var date = document.getElementById("dob").value;
  31. document.getElementById("user").innerHTML = name + surname + date;
  32. }
  33.  
  34. function password() {
  35. var p1=document.getElementById("password1").value;
  36. var p2=document.getElementById("password2").value;
  37. if(p1!=p2) {
  38. alert("Your passwords did not match, please try again");
  39. return false;}
  40. else{ alert("Your password has been set");
  41. return true;
  42. }
  43.  
  44.  
  45.  
  46. }
  47. </script>
  48. </p>
  49. </body>
  50. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement