最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

onchange Event

Internet Development Index

Fires when the contents of the object or selection have changed.

Syntax

Inline HTML<ELEMENT onchange = "handler" ... > All platforms
Event propertyobject.onchange = handlerJScript only
object.onchange = GetRef("handler")Visual Basic Scripting Edition (VBScript) 5.0 or later only
Named script <SCRIPT FOR = object EVENT = onchange> Internet Explorer only

Event Information

BubblesNo
CancelsYes
To invoke
  • Choose a different option in a select object using mouse or keyboard navigation.
  • Alter text in the text area and then navigate out of the object.
Default action Changed text selection is committed.

Event Object Properties

Although event handlers in the DHTML Object Model do not receive parameters directly, a handler can query an event object for data.

Available Properties

altKey Sets or retrieves a value that indicates the state of the ALT key.
altLeft Sets or retrieves a value that indicates the state of the left ALT key.
clientX Sets or retrieves the x-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
clientY Sets or retrieves the y-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
ctrlLeft Sets or retrieves the state of the left CTRL key.
offsetX Sets or retrieves the x-coordinate of the mouse pointer's position relative to the object firing the event.
offsetY Sets or retrieves the y-coordinate of the mouse pointer's position relative to the object firing the event.
returnValue Sets or retrieves the return value from the event.
screenX Retrieves the x-coordinate of the mouse pointer's position relative to the user's screen.
screenY Sets or retrieves the y-coordinate of the mouse pointer's position relative to the user's screen.
shiftLeft Retrieves the state of the left SHIFT key.
srcElement Sets or retrieves the object that fired the event.
type Sets or retrieves the event name from the event object.
x Sets or retrieves the x-coordinate, in pixels, of the mouse pointer's position relative to a relatively positioned parent element.
y Sets or retrieves the y-coordinate, in pixels, of the mouse pointer's position relative to a relatively positioned parent element.

Remarks

This event is fired when the contents are committed and not while the value is changing. For example, on a text box, this event is not fired while the user is typing, but rather when the user commits the change by leaving the text box that has focus. In addition, this event is executed before the code specified by onblur when the control is also losing the focus.

The onchange event does not fire when the selected option of the select object is changed programatically.

Example

This example uses the onchange event to retrieve the selected option of a select object.

<BODY>
<FORM>
<P>Select a different option in the
drop-down list box to trigger the onchange event.
<SELECT NAME=selTest
onchange="alert('Index: ' + this.selectedIndex
+ '\nValue: ' + this.options[this.selectedIndex].value)">
<OPTION VALUE="Books">Books
<OPTION VALUE="Clothing">Clothing
<OPTION VALUE="Housewares">Housewares
</SELECT>
</FORM>
</BODY>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

This event is defined in HTML 4.0 Non-Microsoft link.

Applies To

INPUT type=text, SELECT, TEXTAREA

See Also

onkeypress
齐河县| 兰州市| 琼结县| 米易县| 汉川市| 北碚区| 永德县| 金乡县| 新密市| 聂拉木县| 漯河市| 金塔县| 彝良县| 太湖县| 阿坝| 平南县| 鱼台县| 兴仁县| 博野县| 五大连池市| 磴口县| 合山市| 肥乡县| 陈巴尔虎旗| 平武县| 贵南县| 斗六市| 泗阳县| 丽水市| 当阳市| 汝阳县| 龙岩市| 虎林市| 壶关县| 进贤县| 忻城县| 陆河县| 旬阳县| 广汉市| 寿光市| 邢台市|