WEB DESIGN GARAGE [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

WEB DESIGN GARAGE [Electronic resources] - نسخه متنی

Marc Campbell

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Working with Password Fields


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.

[View full size image]

FAQ

Can you use password fields for other kinds of input?

Certainly. You don't have to restrict password fields to passwords only. PINs, keycodes, and account numbers are all viable candidates for this type of widget.

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">


TIP


As with text fields and file fields, you set the physical width of a password field with the size attribute, and the maximum number of characters that the visitor can enter with the maxlength attribute.

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;


/ 175