Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.29 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width">
  6. <title>Mile High Login</title>
  7. <style id="jsbin-css">
  8. input {
  9. height: 42px;
  10. padding: 5px;
  11. font-size: 28px;
  12. }
  13.  
  14.  
  15. input:nth-child(1) {
  16. width: 150px;
  17. }
  18.  
  19.  
  20. input:nth-child(3) {
  21. width: 200px;
  22. margin-top: 10px;
  23. }
  24.  
  25. button {
  26. padding: 5px;
  27. height: 55px;
  28. vertical-align: top;
  29. background-color: lightblue;
  30. width: 125px;
  31. color: red;
  32. font-size: 30px;
  33. border: solid 1px black;
  34. }
  35. </style>
  36. </head>
  37. <body>
  38.  
  39.  
  40. <!-- FORM -->
  41. <div>
  42. <h1> Mile High Club</h1>
  43. <!-- ASSIGN ATTRIBUTE TYPE = NUMBER -->
  44. <input placeholder="Year Born" type="number"/>
  45. <!--
  46. <select></select>
  47. -->
  48. <br /><br />
  49.  
  50. <!-- ASSIGN ATTRIBUTE TYPE = TEXT -->
  51.  
  52. <input placeholder="Username" type="text"/>
  53. <br /><br />
  54.  
  55. <!-- ASSIGN ATTRIBUTE TYPE = PASSWORD -->
  56. <input placeholder="Password" type="password"/>
  57.  
  58. <!-- -->
  59. <button class="Log">Login</button>
  60. </div>
  61.  
  62.  
  63. <!-- DISPLAY MESSAGE HERE -->
  64. <div></div>
  65. <script id="jsbin-javascript">
  66. var user = "AlIcE", pass = "WoNdErLaNd", age = 36;
  67.  
  68.  
  69.  
  70. // PART I
  71.  
  72. // Create a click handler for your button
  73. // Within it
  74. // Get the
  75. // 1. username textbox value and save it
  76. // 2. password textbox value and save it
  77. // 3. year born textbox value parse to Number and save it
  78. // At the end of your *scope*
  79. // Type in this line below; fill in variable with the previous 2 lines
  80. // validateLogin( variable #1 , variable #2, variable #3 );
  81. $('.Log').click(function(){
  82. $("Year Born").val();
  83. });
  84.  
  85.  
  86.  
  87. // PART II
  88. // Type in the line below
  89. // function validateLogin( variable #1 , variable #2, variable #3 ) { }
  90.  
  91. // Within it's scope
  92. // 1. check to see if the textbox username equals user variable
  93. // 2. repeat step 1 except compare textbox password to pass
  94. // 3. check if the age is older than the age variable then save one of the messages w/ a variable
  95. // "You are a young adult"
  96. // else
  97. // "Please wait ## years before you can join!"
  98.  
  99.  
  100. // if valid entry; hide the form and display your entry message
  101. // else display the wait message but do not hide the form
  102. // style the message accodingly. *Use your discretion*
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113. // CHALLENGE
  114. // populateSelectMenu();
  115.  
  116. function generateYears(){
  117. var begin = 1960, end = 2017, htmlStr = "";
  118.  
  119. for(begin; begin <= end; begin++) {
  120. htmlStr += "<option>" + begin + "</option>";
  121. }
  122.  
  123. return htmlStr;
  124. }
  125.  
  126.  
  127. function populateSelectMenu() {
  128.  
  129. }
  130. </script>
  131.  
  132.  
  133. <script id="jsbin-source-css" type="text/css">input {
  134. height: 42px;
  135. padding: 5px;
  136. font-size: 28px;
  137. }
  138.  
  139.  
  140. input:nth-child(1) {
  141. width: 150px;
  142. }
  143.  
  144.  
  145. input:nth-child(3) {
  146. width: 200px;
  147. margin-top: 10px;
  148. }
  149.  
  150. button {
  151. padding: 5px;
  152. height: 55px;
  153. vertical-align: top;
  154. background-color: lightblue;
  155. width: 125px;
  156. color: red;
  157. font-size: 30px;
  158. border: solid 1px black;
  159. }</script>
  160.  
  161. <script id="jsbin-source-javascript" type="text/javascript">var user = "AlIcE", pass = "WoNdErLaNd", age = 36;
  162.  
  163.  
  164.  
  165. // PART I
  166.  
  167. // Create a click handler for your button
  168. // Within it
  169. // Get the
  170. // 1. username textbox value and save it
  171. // 2. password textbox value and save it
  172. // 3. year born textbox value parse to Number and save it
  173. // At the end of your *scope*
  174. // Type in this line below; fill in variable with the previous 2 lines
  175. // validateLogin( variable #1 , variable #2, variable #3 );
  176. $('.Log').click(function(){
  177. $("Year Born").val();
  178. });
  179.  
  180.  
  181.  
  182. // PART II
  183. // Type in the line below
  184. // function validateLogin( variable #1 , variable #2, variable #3 ) { }
  185.  
  186. // Within it's scope
  187. // 1. check to see if the textbox username equals user variable
  188. // 2. repeat step 1 except compare textbox password to pass
  189. // 3. check if the age is older than the age variable then save one of the messages w/ a variable
  190. // "You are a young adult"
  191. // else
  192. // "Please wait ## years before you can join!"
  193.  
  194.  
  195. // if valid entry; hide the form and display your entry message
  196. // else display the wait message but do not hide the form
  197. // style the message accodingly. *Use your discretion*
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208. // CHALLENGE
  209. // populateSelectMenu();
  210.  
  211. function generateYears(){
  212. var begin = 1960, end = 2017, htmlStr = "";
  213.  
  214. for(begin; begin <= end; begin++) {
  215. htmlStr += "<option>" + begin + "</option>";
  216. }
  217.  
  218. return htmlStr;
  219. }
  220.  
  221.  
  222. function populateSelectMenu() {
  223.  
  224. }</script></body>
  225. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement