当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM Button对象

HTML DOM
DOM Input Checkbox
DOM Input File 对象
DOM Input Hidden对象
DOM Input Password 对象
DOM Input Radio 对象
DOM Input Reset 对象
DOM Input Submit 对象
DOM Input Text 对象
DOM Link 对象
DOM Location 对象
DOM Meta 对象
DOM Navigator 对象
DOM 对象
DOM Option 对象
DOM Screen 对象
DOM Select 对象
DOM Style 对象
DOM Table 对象
DOM TableData 对象
DOM TableHeader 对象

HTML DOM Button对象


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 929 ::
收藏到网摘: n/a

Button Object
按钮对象

The Button object represents a button in an HTML form. For each instance of an <input type="button"> tag in an HTML form, a Button object is created.
按钮对象可以代表在HTML表单中的按钮。每当HTML表单中有<input type="button">标签,一个按钮对象就建立起来了

You can access a Button object by indexing the elements array (by number or name) of the corresponding form or by using getElementById().
你可以通过使用getElementById()或是表单元素数组的数字或是名称来访问按钮对象。

IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).

Button Object Properties
按钮对象属性

Property
属性
Description
描述
IE  F O W3C
accessKey Sets or returns the keyboard key to access a button
设置或返回可访问按钮的键盘键
5 1 9 Yes
disabled Sets or returns whether or not a button should be disabled
设置或返回按钮是否可用
5 1 9 Yes
form Returns a reference to the form that contains the button
为包含按钮的表单返回一份参考
4 1 9 Yes
id Sets or returns the id of a button
设置或返回按钮的id
4 1 9 Yes
name Sets or returns the name of a button
设置或返回按钮的name
4 1 9 Yes
tabIndex Sets or returns the tab order for a button
设置或返回按钮统计表
5 1 9 Yes
type Returns the type of form element a button is
返回表单中按钮类型
4 1 9 Yes
value Sets or returns the text that is displayed on the button
设置或返回按钮文字是否显示
4 1 9 Yes

Standard Properties
标准属性

Property
属性
Description
描述
IE  F O W3C
className Sets or returns the class attribute of an element
设置或返回元素的class属性
5 1 9 Yes
dir Sets or returns the direction of text
设置或返回文字方向
5 1 9 Yes
lang Sets or returns the language code for an element
设置或返回元素的代码语言
5 1 9 Yes
title Sets or returns an element's advisory title
设置或返回元素的咨询标题
5 1 9 Yes

Button Object Methods
按钮对象方法

Method
方法
Description
描述
IE F O W3C
blur() Removes focus from a button
删除对按钮的聚焦
4 1 9 Yes
click() Simulates a mouse-click on a button
模仿鼠标点击
4 1 9 Yes
focus() Gives focus to a button
聚焦到按钮上
4 1 9 Yes

评论 (0) All

登陆 | 还没注册?