Vstup Typ hesla Vlastnost
Příklad
Zjistěte, jaký typ prvku formuláře je pole pro heslo:
var x = document.getElementById("myPsw").type;
Definice a použití
Vlastnost type vrací, jaký typ prvku formuláře je pole hesla.
U pole hesla tato vlastnost vždy vrátí "heslo".
Podpora prohlížeče
Property | |||||
---|---|---|---|---|---|
type | Yes | 10.0 | Yes | Yes | Yes |
Syntax
passwordObject.type
Návratová hodnota
Type | Description |
---|---|
String | The type of form element the password field is |
❮ Zadejte objekt hesla