Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Treeside Holidays</title>
- </head>
- <body>
- <h1>Treeside Holidays</h1>
- <p>Please enter your details. Treeside holidays will automatically generate your username from your details.</p> Please enter a password for your account.</p>
- <p>First name: <input type="text" id="fname" /></p>
- <p>Surname: <input type="text" id="sname" /></p>
- <p>Date of birth: <input type="text" id="dob" /> (Please enter as dd/mm/yyyy)</p>
- <button onclick="user()">Generate Username</button>
- <p>Please enter a password for your account.</p>
- <p>Enter password: <input type="text" id="password1" /></p>
- <p>Re-enter password: <input type="text" id="password2"/></p>
- <button onclick="password()">Submit Password</button>
- <p> Username: <input type="text" id="user" /> </p>
- <script>
- function user(){
- var name=document.getElementById("fname").value;
- var surname=document.getElementById("sname").value;
- var date=document.getElementById("dob").value;
- document.getElementById("user").innerHTML= name + surname +date;
- function password() {
- var p1=document.getElementById("password1").value;
- var p2=document.getElementById("password2").value;
- if(p1!=p2) {
- alert("Your passwords did not match, please try again");
- return false;}
- else{ alert(Your password has been set); return true;
- }
- }
- </p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement