Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 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. function user(){
  27. var name=document.getElementById("fname").value;
  28. var surname=document.getElementById("sname").value;
  29. var date=document.getElementById("dob").value;
  30. document.getElementById("user").innerHTML= name + surname +date;
  31.  
  32. function password() {
  33. var p1=document.getElementById("password1").value;
  34. var p2=document.getElementById("password2").value;
  35. if(p1!=p2) {
  36. alert("Your passwords did not match, please try again");
  37. return false;}
  38. else{ alert(Your password has been set); return true;
  39. }
  40.  
  41.  
  42.  
  43. }
  44. </p>
  45. </body>
  46. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement