最新国产好看的视频,伊人天堂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
麟游县| 万宁市| 阆中市| 砚山县| 西丰县| 金沙县| 靖宇县| 西昌市| 莒南县| 磐安县| 托克托县| 永泰县| 沾益县| 道孚县| 武城县| 太仓市| 庆安县| 太湖县| 扬州市| 汉川市| 鸡东县| 蚌埠市| 松阳县| 瑞安市| 伊金霍洛旗| 仪征市| 抚州市| 浙江省| 内丘县| 怀远县| 车致| 青神县| 新乡县| 西平县| 汉源县| 琼结县| 西安市| 柳州市| 台前县| 永嘉县| 永修县|