HTML DOM type 属性

定义和用法

type 属性可返回元素的表单类型。对于一个 checkbox 对象,该属性总是返回 "checkbox"。

语法

checkboxObject.type

实例

下面的例子返回了 checkbox 的表单元素类型:

<html>
<body>

<form>
<input type="checkbox" id="check1" />
</form>

<script type="text/javascript">
x=document.getElementById("check1");
document.write("Form element type is: ");
document.write(x.type);
</script>

</body>
</html>
系统帮助 | 给我留言 | 收藏本站
Copyright © 2005-2008 www.cnn84.com All Rights Reserved Ver:2.0
CNN84网是公益性便民网站,是为了给大家的日常生活查询及提供最快捷的出行指南