Advertisement
Guest User

Untitled

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