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