入力パスワードタイププロパティ
例
パスワードフィールドがどのタイプのフォーム要素であるかを調べます。
var x = document.getElementById("myPsw").type;
定義と使用法
typeプロパティは、パスワードフィールドがどのタイプのフォーム要素であるかを返します。
パスワードフィールドの場合、このプロパティは常に「password」を返します。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
type | Yes | 10.0 | Yes | Yes | Yes |
構文
passwordObject.type
戻り値
Type | Description |
---|---|
String | The type of form element the password field is |
❮パスワードオブジェクトの入力