| Article Introduction: event. What is the difference between X and Event.clientx. |
Event.clientxReturns the x-coordinate of the mouse relative to the client window when an event occurs
Event. So does X.
However, if you set the Location property value of an event object to relative
Event.clientxNot change
and event. x returns the coordinates of the event object relative to the ontology
Event object detailed Icooe 2000.3.31 http://www.51js.com/
An event represents the state of an incident, such as the element that the event occurred, the location of the mouse, and so on, and the event object is valid only during the events.
event property:
Altkey
Retrieves the current state of the ALT key
Possible value true is off
False to not close
button
Retrieve a pressed mouse button
Possible values: 0 no buttons
1 Press left button
2 Press the right button
3 Press about key
4 Press the Middle key
5 left and Middle keys
6 Press right and middle key
7 Press All the keys
Cancelbubble
Sets or retrieves whether the current event bubbles the event handle
Possible values: false enable bubbling
True to cancel the event bubbling
ClientX
Retrieves the x-coordinate of the mouse cursor associated with the window client area, which is read-only and has no default value.
ClientY
Retrieves the y-coordinate of the mouse cursor associated with the window client area, is read-only, and has no default value.
Ctrlkey
Ctrlkey retrieves the current state of the CTRL key
Possible value true is off
False to not close
Datafld
Retrieves the columns affected by Oncellchange
Atransfer
Provides a predefined clipboard for a drag-and-drop operation.
Element
Retrieves an object pointer that exits during on mouseover and on mouseout events
KeyCode
Sets or retrieves the Unicode keyword code associated with the keyword that raised the event
This property is used with onkeydown onkeyup onkeypress
If no keyword is raised for the event, the value is 0
OffsetX
Retrieves the horizontal coordinates of the mouse position associated with the object that triggered the event
OffsetY
Retrieves the vertical coordinates of the mouse position associated with the object that triggered the event
PropertyName
Retrieves the name of an attribute that has changed on an object
Reason
Retrieving the results of data source Object transfer
Possible values:
0 Data transmission Success
1 Data transfer failed
2 Data transfer Error
Recordset
Retrieving a reference to a default recordset in a data source object
This attribute is read-only
Repeat
Retrieves whether an event is repeated
This property returns true only if the onkeydown event repeats
Returnvalues
Sets or retrieves the value returned from an event
Possible values:
The value in the true event is returned
False the default action for events on the source object is canceled
ScreenX
Retrieves the horizontal position of the mouse associated with the user screen
ScreenY
Retrieves the vertical position of the mouse associated with a user screen
Shiftkey
Retrieves the current state of the Shiftkey key
Possible value true is off
False to not close
Srcelement
Retrieving the object that triggered the event
Srcfilter
Retrieving the filter object that caused the onfilterchange event to fire
Srcum
Retrieves the same resource name that triggers the event behavior
This attribute is set to null unless all of the following two conditions are true
1. Behavior is attached to the elements that trigger the event
2. The behavior defined in the previous bullets has specified a URN identifier and an event that has already been triggered
Toelement
Retrieves an object that is moved as an on mouseover or on Mouseout event result
Type
Retrieving event names from event objects
X
Retrieves an integer relative to the parent element's mouse horizontal coordinate
Y
Retrieves an integer relative to the parent element's mouse vertical coordinates