Password fields are like text fields, only the text inside them appears dotted out, as in Figure 68.8. You typically use these kinds of fields to accept passwords, naturally, or any other kind of input that you would rather not display literally on screen. Figure 68.8. Use password fields when you don't want to display the exact text of the field on screen.
Listing 68.8. View Source for Figure 68.8.<form> <strong>Password:</strong> <input type="password" name="userPassword" value="ladda"> </form> In this example, the password field has a preset value. That is, the text of the value attribute appears in the password field when the page loads. If you don't want your password field to load a preset value, simply leave this attribute out: <input type="password" name="userPassword">
Even though the browser conceals the actual value of the password field on screen, the Web server receives the literal text inside the password field upon submission, along these lines: userPassword=ladda; |