HTML DOM Input Text type 属性
最后更新于:2022-03-26 22:25:01
Input Text type 属性
Input Text 对象
Example
查看文本域是属于哪种表单元素类型:
var x = document.getElementById(“myText”).type;
x 输出结果为:
text
尝试一下 »
定义和用法
type 属性返回文本域的表单元素类型。
对于文本域,该属性总是返回 “text”。
浏览器支持





所有主流浏览器都支持 type 属性
语法
返回值
Input Text 对象