JavaScript e Ajax

Page 244

Learn JavaScript and Ajax with w3schools

Password Object Properties W3C: W3C Standard. Property alt

Description Sets or returns an alternate text to display if a browser does not support password fields defaultValue Sets or returns the default value of a password field disabled Sets or returns whether a password field should be disabled form Returns a reference to the form that contains the password field maxLength Sets or returns the maximum number of characters in a password field name Sets or returns the name of a password field readOnly Sets or returns whether a password field should be read-only size Sets or returns the size of a password field type Returns the type of form element a password field is value Sets or returns the value of the value attribute of the password field

W3C Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Password Object Methods Method select()

Description Selects the text in a password field

W3C Yes

Standard Properties, Methods, and Events The Password object also supports the standard properties, methods, and events.

Radio Object The Radio object represents a radio button in an HTML form. For each <input type="radio"> tag in an HTML form, a Radio object is created. You can access a Radio object by searching through the elements[] array of the form or by using document.getElementById().

Radio Object Properties W3C: W3C Standard. Property alt

Description Sets or returns an alternate text to display if a browser does not support radio buttons checked Sets or returns the state of a radio button defaultChecked Returns the default state of a radio button

230

W3C Yes Yes Yes


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.