Textarea type 属性
 Textarea 对象
 Textarea 对象
定义和用法
type 属性返回表单元素的类型。
对于文本框永远是 "textarea"。
语法
textareaObject.type
浏览器支持





所有主流浏览器都支持 type 属性
实例
实例
返回表单元素的类型:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>代码学院(codexy.cn)</title>
<script>
function displayResult()
{
alert(document.getElementById("myTextarea").type);
}
</script>
</head>
<body>
<textarea id="myTextarea" cols="20">
在代码学院,你可以学多很多编程的基础知识,包括 HTML, XML, SQL, ASP, 和 PHP 等各种前端内容。
</textarea>
<br>
<button type="button" onclick="displayResult()">返回表单元素的类型</button>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>代码学院(codexy.cn)</title>
<script>
function displayResult()
{
alert(document.getElementById("myTextarea").type);
}
</script>
</head>
<body>
<textarea id="myTextarea" cols="20">
在代码学院,你可以学多很多编程的基础知识,包括 HTML, XML, SQL, ASP, 和 PHP 等各种前端内容。
</textarea>
<br>
<button type="button" onclick="displayResult()">返回表单元素的类型</button>
</body>
</html>
 Textarea 对象
 Textarea 对象			
						
			
 JavaScript 教程
JavaScript 教程 JavaScript 对象
JavaScript 对象 jQuery 教程
jQuery 教程 JSON 教程
JSON 教程 AngularJS 教程
AngularJS 教程 Angular 2 教程
Angular 2 教程 Vue.js 教程
Vue.js 教程 React 教程
React 教程 jQuery UI 教程
jQuery UI 教程 jQuery EasyUI 教程
jQuery EasyUI 教程 AJAX 教程
AJAX 教程 Highcharts 教程
Highcharts 教程 Google Maps API 教程
Google Maps API 教程 ES6 教程
ES6 教程 TypeScript教程
TypeScript教程 ES6 标准入门
ES6 标准入门