English subtitles

← Passwords - Web Development

Get Embed Code
4 Languages

Showing Revision 11 created 05/25/2016 by Udacity Robot.

  1. Okay. So here we are in our Editor again, and this is the basic HTML file
  2. we were editing before and that we were opening in our browser.
  3. We're going to go back to this a little bit so we can learn
  4. some new form elements.
  5. So the first thing I'm going to do is remove the Action parameter
  6. from the Form element so that we can submit
  7. the form to itself and we'll see the "q" parameter in the URL again.
  8. This makes it easy to demonstrate what's going on,
  9. without having to go back to our app Server and all of that stuff.
  10. So I removed that; let's go to our browser and let's give this form a test.
  11. So I reload the page,
  12. I type in: "some junk" here,
  13. which it autocompletes for me.
  14. I click Submit,
  15. and we see "some junk" in the URL:
  16. q=some+junk.
  17. Okay. Let's go back to our Editor.
  18. So here we are in our Editor.
  19. One thing that I'm leaving off is the Type parameter on this first input.
  20. So let's go ahead and add that:
  21. type="text"--
  22. type="text" is the default type of an input parameter.
  23. I didn't include it originally because I didn't want to
  24. spend a whole lot of time talking about that, at the time.
  25. But in reality, we want to be a little bit more specific with our types,
  26. especially now that we're going to learn some new types.
  27. So if I change that to type "text" the behavior won't change in the browser.
  28. And the first thing we're going to do is learn a new type.
  29. So instead of being "text"
  30. we're going to change this to "password".
  31. The "password" type is useful for entering passwords in a text box.
  32. Okay--so here we are in our browser.
  33. Now when we type some text into the box here,
  34. it appears as dots instead of the actual text.
  35. So for the next quiz, what I'd like you to do is
  36. tell me what happens when I click the Submit button.
  37. You can try this out on your own, at home.