Advertisement
Guest User

Untitled

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