Input Text type 属性
定义和用法
type
属性返回文本字段是哪种类型的表单元素。
For text fields, this property will always return \text
"。
Example
Find out which type of form element the text field belongs to:
var x = document.getElementById("myText").type;
Syntax
textObject.type
Technical Details
Return value: | String, text field form element type. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |