Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.97 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  6. <title>Title</title>
  7. <style>
  8. #picture{float: left; width: 33%}
  9. img{width: 100%}
  10. a{padding-left: 30%}
  11. .nav-tabs { border-bottom: none; }
  12. footer {background-color: #ffee10}
  13. #specs_p{display: none}
  14. #regis_p{display: none}
  15.  
  16. </style>
  17.  
  18. </head>
  19.  
  20. <body>
  21.  
  22. <header>
  23. <h1>Header</h1>
  24. </header>
  25.  
  26. <div id="picture">
  27. <img src="http://techfaqs.net/wp-content/uploads/2016/05/ft4CBTdAThZ8frzjffWqw.png" alt="samsung">
  28. <a href="http://www.samsung.com/ca/consumer/mobile-devices/smartphones/galaxy-note/SM-N920WZKAXAC">link</a>
  29. </div>
  30.  
  31. <div id="tabs">
  32. <ul class="nav nav-tabs">
  33. <li id="intro" class="active"><a href="#">Intro</a>
  34. <p id="intro_p">text Intro</p> <!--WRITE THE INTRO OF THE PHONE INSIDE THERE-->
  35. </li>
  36.  
  37. <li id="specs"><a href="#">Specs</a>
  38. <p id="specs_p">
  39. <class= "font1">Battery</class><br>
  40. Li-Po 3020 mAh<br>
  41. Talk Time:Up to 28 hours<br>
  42. Standby time:Up to 1 week<br>
  43. Music Playback:Up to 57 hours<br><br>
  44.  
  45. Rear Camer<br>
  46. 16 megapixel Sony Exmor RS IMX240<br><br>
  47.  
  48. Front Camera<br>
  49. 5 megapixel, 1440p@30fps, dual video call, Auto HDR<br><br>
  50.  
  51. Processor<br>
  52. CPU: Octa-Core (Exynos 7420)<br>
  53. GPU: Mali-T760 MP8<br>
  54. RAM: 4 GB LPDDR4<br><br>
  55.  
  56. Operating System:<br>
  57. Android v5.1 Lolipop</p> <!--WRITE THE SPECS OF THE PHONE INSIDE THERE-->
  58.  
  59. </li>
  60.  
  61. <li id="regis"><a href="#">Registration Form</a>
  62. <form id="regis_p" action="index.html" method="POST" autocomplete="on" onsubmit="form_validation()"><br>
  63. Username:<input type="text" name="username" required><br>
  64. Password:<input type="password" name="password" required><br>
  65. First Name:<input type="text" name="fname" required><br>
  66. Last Name:<input type="text" name="lname" required><br>
  67. Email:<input type="email" name="email" required><br>
  68. Address:<input type="text" name="add" required><br>
  69. Postal code:<input type="text" name="postal" required ><br>
  70. City:<input type="text" name="city" required ><br>
  71. Province: <select id = "province" required>
  72. <option Value="Ontario">Ontario</option>
  73. <option Value="Quebec">Quebec</option>
  74. <option Value="Nova Scotia">Nova Scotia</option>
  75. <option Value="New Brunswick">New Brunswick</option>
  76. <option Value="Manitoba">Manitoba</option>
  77. <option Value="British Columbia">British Columbia</option>
  78. <option Value="Prince Edward Island">Prince Edward Island</option>
  79. <option Value="Saskatchewan">Saskatchewan</option>
  80. <option Value="Alberta">Alberta</option>
  81. <option Value="Newfoundland and Labrador">Newfoundland and Labrador</option>
  82. </select><br>
  83. Birthday: <input type="date" name="bday" max="2000-01-01"><br>
  84. <br>
  85. <input type="submit" value="Register Now!">
  86. </form>
  87. </li>
  88.  
  89. </ul>
  90.  
  91. </div>
  92.  
  93.  
  94. <footer>
  95. <h3>Footer</h3>
  96. </footer>
  97.  
  98. <script>
  99. document.getElementById("intro").addEventListener("click", display_intro);
  100. document.getElementById("specs").addEventListener("click", display_specs);
  101. document.getElementById("regis").addEventListener("click", display_regis);
  102.  
  103. function display_intro()
  104. {
  105. document.getElementById("intro").setAttribute("class", "active");
  106. document.getElementById("specs").setAttribute("class", "");
  107. document.getElementById("regis").setAttribute("class", "");
  108. document.getElementById("intro_p").style.display = "inline-block";
  109. document.getElementById("regis_p").style.display = "none";
  110. document.getElementById("specs_p").style.display = "none";
  111. }
  112.  
  113. function display_specs()
  114. {
  115. document.getElementById("intro").setAttribute("class", "");
  116. document.getElementById("specs").setAttribute("class", "active");
  117. document.getElementById("regis").setAttribute("class", "");
  118. document.getElementById("intro_p").style.display = "none";
  119. document.getElementById("regis_p").style.display = "none";
  120. document.getElementById("specs_p").style.display = "inline-block";
  121. }
  122.  
  123. function display_regis()
  124. {
  125. document.getElementById("intro").setAttribute("class", "");
  126. document.getElementById("specs").setAttribute("class", "");
  127. document.getElementById("regis").setAttribute("class", "active");
  128. document.getElementById("intro_p").style.display = "none";
  129. document.getElementById("regis_p").style.display = "inline-block";
  130. document.getElementById("specs_p").style.display = "none";
  131. }
  132.  
  133. function form_validation()
  134. {
  135. if (true)
  136. { alert("Username: "+document.getElementsByName("username") [0].value+"\n"+
  137. "Password: "+document.getElementsByName("password") [0].value+"\n"+
  138. "First Name: "+document.getElementsByName("fname") [0].value+"\n"+
  139. "Last Name: "+document.getElementsByName("lname") [0].value+"\n"+
  140. "Email: "+document.getElementsByName("email") [0].value+"\n"+
  141. "Address: "+document.getElementsByName("add") [0].value+"\n"+
  142. "Postal Code: "+document.getElementsByName("postal") [0].value+"\n"+
  143. "City: "+document.getElementsByName("city") [0].value+"\n"
  144.  
  145. // still have to fix province and date of birth to be able to select and get an output
  146. // ,we have to make sure also how to validade postal code and province
  147.  
  148. );
  149. return true
  150. }
  151.  
  152. else
  153. {return false}
  154. }
  155.  
  156.  
  157.  
  158. </script>
  159. </body>
  160. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement