SlideShare uma empresa Scribd logo
1 de 1
Baixar para ler offline
Microsoft AJAX Library: Sys.UI.DomEvent Class
                                                                                                       preventDefault ()
addHandler (element, eventName, handler)
                                                                                                       Prevents the default event action from being raised. For example, if you prevent
$addHandler (element, eventName, handler                                                               the hyperlink click event from being raised, the browser will not follow the link.
Adds a DOM event handler to an element. eventName should not include the quot;onquot;
                                                                                                       $addHandler ($get (quot;showMoreLinkquot;), quot;clickquot;, showMore);
prefix.                                                                                                function showMore (e) { e.preventDefault (); }
Remarks                                                                                                stopPropagation ()
In the event handler, this points to the DOM element the event was attached to,                        Prevents an event from being propagated (bubbled) to parent element(s).
not necessarily the element that triggered the event.
                                                                                                       Remarks
Sys.UI.DomEvent.addHandler (element, quot;clickquot;, clickHandler);
                                                                                                       By default, event notification is bubbled from a child object to parent objects until
// Same as $addHandler (element, quot;clickquot;, clickHandler);
function clickHandler (e) { … }                                                                        it reaches document. Use the stopPropagation method to prevent an event from
                                                                                                       being propagated to parent elements.
addHandlers (element, events, handlerOwner)
$addHandlers (element, events, handlerOwner)                                                           Event properties
Adds a list of DOM event handlers to an element. events is a dictionary of event
handlers. Event names should not include the quot;onquot; prefix.
                                                                                                                      Indicates if the ALT key was pressed when the event occurred.
                                                                                                       altKey
$addHandlers ($get (quot;articlequot;), {
     mouseover: onMouseOver,
                                                                                                                      One of Sys.UI.MouseButton values: leftButton, middleButton, or
                                                                                                       button
     mouseout: onMouseOut
                                                                                                                      rightButton.
});
                                                                                                                      An integer value that represents the character code of the key that was pressed
                                                                                                                      to raise the event. Can be one of Sys.UI.Key values: backspace, tab, enter,
function onMouseOver (e) { this.style.backgroundColor = 'yellow'; }                                    charCode
function onMouseOut (e) { this.style.backgroundColor = 'white'; }                                                     esc, space, pageUp, pageDown, end, home, left, up, right, down, del.

Remarks                                                                                                               The x-coordinate of the mouse pointer's position relative to the visible
                                                                                                       clientX
                                                                                                                      document area of the browser window, excluding window scroll bars.
Inside each event handler, this will point to handlerOwner if it is specified (see
                                                                                                                      The y-coordinate of the mouse pointer's position relative to the visible
Adding Client Behaviors to Web Server Controls Using ASP.NET AJAX                                      clientY
                                                                                                                      document area of the browser window, excluding window scroll bars.
Extensions in documentation). If handlerOwner is omitted, this points to the
DOM element the event was attached to.                                                                                Indicates if the CTRL key was pressed when the event occurred.
                                                                                                       ctrlKey

clearHandlers (element)                                                                                               The horizontal offset between the mouse position and the left side of the
                                                                                                       offsetX
                                                                                                                      object that raised the event.
$clearHandlers (element)
                                                                                                                      The vertical offset between the mouse position and the top of the object that
Removes all event handlers from the specified element.                                                 offsetY
                                                                                                                      raised the event
Sys.UI.DomEvent.clearHandlers (element);
                                                                                                       rawEvent       The original DOM event.
// Same as $ clearHandlers (element);
                                                                                                                      The horizontal offset between the user's screen and the mouse pointer's
removeHandler (element, eventName, handler)                                                            screenX        position.
$removeHandler (element, eventName, handler)
                                                                                                                      The vertical offset between the user's screen and the mouse pointer's position.
                                                                                                       screenY
Removes an event handler from the specified element. eventName should not
include the quot;onquot; prefix.                                                                                              Indicates if the SHIFT key was pressed when the event occurred.
                                                                                                       shiftKey
Sys.UI.DomEvent.removeHandler (element, quot;clickquot;, clickHandler);
                                                                                                                      The object that raised the event.
                                                                                                       target
// Same as $removeHandler (element, quot;clickquot;, clickHandler);
                                                                                                                      The name of the event that was raised (e.g., quot;clickquot;).
                                                                                                       type


   A function is static and is invoked without creating an instance of the object   Based on Microsoft AJAX Library 1.0 • Compiled by Milan Negovan • www.AspNetResources.com • Last update: 2007-01-24

Mais conteúdo relacionado

Mais procurados

Getting touchy - an introduction to touch and pointer events / Future of Web ...
Getting touchy - an introduction to touch and pointer events / Future of Web ...Getting touchy - an introduction to touch and pointer events / Future of Web ...
Getting touchy - an introduction to touch and pointer events / Future of Web ...
Patrick Lauke
 
Event handling63
Event handling63Event handling63
Event handling63
myrajendra
 

Mais procurados (20)

Java eventhandling
Java eventhandlingJava eventhandling
Java eventhandling
 
Ajp notes-chapter-03
Ajp notes-chapter-03Ajp notes-chapter-03
Ajp notes-chapter-03
 
CoW Documentatie
CoW DocumentatieCoW Documentatie
CoW Documentatie
 
Event handling
Event handlingEvent handling
Event handling
 
Dr Jammi Ashok - Introduction to Java Material (OOPs)
 Dr Jammi Ashok - Introduction to Java Material (OOPs) Dr Jammi Ashok - Introduction to Java Material (OOPs)
Dr Jammi Ashok - Introduction to Java Material (OOPs)
 
Event handling
Event handlingEvent handling
Event handling
 
Event Handling in java
Event Handling in javaEvent Handling in java
Event Handling in java
 
Android 3
Android 3Android 3
Android 3
 
Java gui event
Java gui eventJava gui event
Java gui event
 
tL20 event handling
tL20 event handlingtL20 event handling
tL20 event handling
 
Java Event Handling
Java Event HandlingJava Event Handling
Java Event Handling
 
Event handling
Event handlingEvent handling
Event handling
 
Replicating the Swipe Gesture iPhone Gallery for mobile web– HTML5 – Part 2
Replicating the Swipe Gesture iPhone Gallery for mobile web– HTML5 – Part 2Replicating the Swipe Gesture iPhone Gallery for mobile web– HTML5 – Part 2
Replicating the Swipe Gesture iPhone Gallery for mobile web– HTML5 – Part 2
 
Event Handling in JAVA
Event Handling in JAVAEvent Handling in JAVA
Event Handling in JAVA
 
Java_Comb
Java_CombJava_Comb
Java_Comb
 
Getting touchy - an introduction to touch and pointer events / Future of Web ...
Getting touchy - an introduction to touch and pointer events / Future of Web ...Getting touchy - an introduction to touch and pointer events / Future of Web ...
Getting touchy - an introduction to touch and pointer events / Future of Web ...
 
Draw2D
Draw2DDraw2D
Draw2D
 
Advancing the UI — Part 1: Look, Motion, and Gestures
Advancing the UI — Part 1: Look, Motion, and GesturesAdvancing the UI — Part 1: Look, Motion, and Gestures
Advancing the UI — Part 1: Look, Motion, and Gestures
 
Event handling63
Event handling63Event handling63
Event handling63
 
Creating Ext GWT Extensions and Components
Creating Ext GWT Extensions and ComponentsCreating Ext GWT Extensions and Components
Creating Ext GWT Extensions and Components
 

Semelhante a Ms Ajax Dom Event Class

jQuery 1.7 Events
jQuery 1.7 EventsjQuery 1.7 Events
jQuery 1.7 Events
dmethvin
 
Flash Lite & Touch: build an iPhone-like dynamic list
Flash Lite & Touch: build an iPhone-like dynamic listFlash Lite & Touch: build an iPhone-like dynamic list
Flash Lite & Touch: build an iPhone-like dynamic list
Small Screen Design
 
Getting touchy - an introduction to touch events / Web Standards Days / Mosco...
Getting touchy - an introduction to touch events / Web Standards Days / Mosco...Getting touchy - an introduction to touch events / Web Standards Days / Mosco...
Getting touchy - an introduction to touch events / Web Standards Days / Mosco...
Patrick Lauke
 

Semelhante a Ms Ajax Dom Event Class (20)

Javascript #8 : événements
Javascript #8 : événementsJavascript #8 : événements
Javascript #8 : événements
 
Events
EventsEvents
Events
 
Lec 5
Lec 5Lec 5
Lec 5
 
Lesson 07 Actions and Commands in WPF
Lesson 07 Actions and Commands in WPFLesson 07 Actions and Commands in WPF
Lesson 07 Actions and Commands in WPF
 
jQuery 1.7 Events
jQuery 1.7 EventsjQuery 1.7 Events
jQuery 1.7 Events
 
Javascript Browser Events.pdf
Javascript Browser Events.pdfJavascript Browser Events.pdf
Javascript Browser Events.pdf
 
Ext Js Events
Ext Js EventsExt Js Events
Ext Js Events
 
Ext Js Events
Ext Js EventsExt Js Events
Ext Js Events
 
Javascript event handler
Javascript event handlerJavascript event handler
Javascript event handler
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events
 
jQuery
jQueryjQuery
jQuery
 
Advanced Jquery
Advanced JqueryAdvanced Jquery
Advanced Jquery
 
Flash Lite & Touch: build an iPhone-like dynamic list
Flash Lite & Touch: build an iPhone-like dynamic listFlash Lite & Touch: build an iPhone-like dynamic list
Flash Lite & Touch: build an iPhone-like dynamic list
 
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry GervinWill your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
 
engineeringdsgtnotesofunitfivesnists.ppt
engineeringdsgtnotesofunitfivesnists.pptengineeringdsgtnotesofunitfivesnists.ppt
engineeringdsgtnotesofunitfivesnists.ppt
 
Getting touchy - an introduction to touch events / Web Standards Days / Mosco...
Getting touchy - an introduction to touch events / Web Standards Days / Mosco...Getting touchy - an introduction to touch events / Web Standards Days / Mosco...
Getting touchy - an introduction to touch events / Web Standards Days / Mosco...
 
Getting touchy - an introduction to touch and pointer events / TPAC 2016 / Li...
Getting touchy - an introduction to touch and pointer events / TPAC 2016 / Li...Getting touchy - an introduction to touch and pointer events / TPAC 2016 / Li...
Getting touchy - an introduction to touch and pointer events / TPAC 2016 / Li...
 
Event
EventEvent
Event
 
Actividad #7 codigo detección de errores (yango colmenares)
Actividad #7 codigo detección de errores (yango colmenares)Actividad #7 codigo detección de errores (yango colmenares)
Actividad #7 codigo detección de errores (yango colmenares)
 
Multi Touch And Gesture Event Interface And Types
Multi Touch And Gesture Event Interface And TypesMulti Touch And Gesture Event Interface And Types
Multi Touch And Gesture Event Interface And Types
 

Mais de jason hu 金良胡 (20)

新员工培训
新员工培训新员工培训
新员工培训
 
Javascript 闭包
Javascript 闭包Javascript 闭包
Javascript 闭包
 
Windows Powershell En
Windows Powershell   EnWindows Powershell   En
Windows Powershell En
 
正则表达式
正则表达式正则表达式
正则表达式
 
Work In Japan
Work In JapanWork In Japan
Work In Japan
 
Linuxcommand
LinuxcommandLinuxcommand
Linuxcommand
 
Ubunturef
UbunturefUbunturef
Ubunturef
 
Asp.Net运行时
Asp.Net运行时Asp.Net运行时
Asp.Net运行时
 
Fwunixref
FwunixrefFwunixref
Fwunixref
 
X Query
X QueryX Query
X Query
 
Sql2005 Xml
Sql2005 XmlSql2005 Xml
Sql2005 Xml
 
Ms Ajax Dom Element Class
Ms Ajax Dom Element ClassMs Ajax Dom Element Class
Ms Ajax Dom Element Class
 
Ms Ajax Dom Element Class
Ms Ajax Dom Element ClassMs Ajax Dom Element Class
Ms Ajax Dom Element Class
 
Ms Ajax Number And Error Extensions
Ms Ajax Number And Error ExtensionsMs Ajax Number And Error Extensions
Ms Ajax Number And Error Extensions
 
Ms Ajax Date And Boolean Extensions
Ms Ajax Date And Boolean ExtensionsMs Ajax Date And Boolean Extensions
Ms Ajax Date And Boolean Extensions
 
Ms Ajax Array Extensions
Ms Ajax Array ExtensionsMs Ajax Array Extensions
Ms Ajax Array Extensions
 
Ms Ajax String And Object Extensions
Ms Ajax String And Object ExtensionsMs Ajax String And Object Extensions
Ms Ajax String And Object Extensions
 
Ext Js Dom Navigation
Ext Js Dom NavigationExt Js Dom Navigation
Ext Js Dom Navigation
 
Ext J S Observable
Ext J S ObservableExt J S Observable
Ext J S Observable
 
Java Script Introduction
Java Script IntroductionJava Script Introduction
Java Script Introduction
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 

Ms Ajax Dom Event Class

  • 1. Microsoft AJAX Library: Sys.UI.DomEvent Class preventDefault () addHandler (element, eventName, handler) Prevents the default event action from being raised. For example, if you prevent $addHandler (element, eventName, handler the hyperlink click event from being raised, the browser will not follow the link. Adds a DOM event handler to an element. eventName should not include the quot;onquot; $addHandler ($get (quot;showMoreLinkquot;), quot;clickquot;, showMore); prefix. function showMore (e) { e.preventDefault (); } Remarks stopPropagation () In the event handler, this points to the DOM element the event was attached to, Prevents an event from being propagated (bubbled) to parent element(s). not necessarily the element that triggered the event. Remarks Sys.UI.DomEvent.addHandler (element, quot;clickquot;, clickHandler); By default, event notification is bubbled from a child object to parent objects until // Same as $addHandler (element, quot;clickquot;, clickHandler); function clickHandler (e) { … } it reaches document. Use the stopPropagation method to prevent an event from being propagated to parent elements. addHandlers (element, events, handlerOwner) $addHandlers (element, events, handlerOwner) Event properties Adds a list of DOM event handlers to an element. events is a dictionary of event handlers. Event names should not include the quot;onquot; prefix. Indicates if the ALT key was pressed when the event occurred. altKey $addHandlers ($get (quot;articlequot;), { mouseover: onMouseOver, One of Sys.UI.MouseButton values: leftButton, middleButton, or button mouseout: onMouseOut rightButton. }); An integer value that represents the character code of the key that was pressed to raise the event. Can be one of Sys.UI.Key values: backspace, tab, enter, function onMouseOver (e) { this.style.backgroundColor = 'yellow'; } charCode function onMouseOut (e) { this.style.backgroundColor = 'white'; } esc, space, pageUp, pageDown, end, home, left, up, right, down, del. Remarks The x-coordinate of the mouse pointer's position relative to the visible clientX document area of the browser window, excluding window scroll bars. Inside each event handler, this will point to handlerOwner if it is specified (see The y-coordinate of the mouse pointer's position relative to the visible Adding Client Behaviors to Web Server Controls Using ASP.NET AJAX clientY document area of the browser window, excluding window scroll bars. Extensions in documentation). If handlerOwner is omitted, this points to the DOM element the event was attached to. Indicates if the CTRL key was pressed when the event occurred. ctrlKey clearHandlers (element) The horizontal offset between the mouse position and the left side of the offsetX object that raised the event. $clearHandlers (element) The vertical offset between the mouse position and the top of the object that Removes all event handlers from the specified element. offsetY raised the event Sys.UI.DomEvent.clearHandlers (element); rawEvent The original DOM event. // Same as $ clearHandlers (element); The horizontal offset between the user's screen and the mouse pointer's removeHandler (element, eventName, handler) screenX position. $removeHandler (element, eventName, handler) The vertical offset between the user's screen and the mouse pointer's position. screenY Removes an event handler from the specified element. eventName should not include the quot;onquot; prefix. Indicates if the SHIFT key was pressed when the event occurred. shiftKey Sys.UI.DomEvent.removeHandler (element, quot;clickquot;, clickHandler); The object that raised the event. target // Same as $removeHandler (element, quot;clickquot;, clickHandler); The name of the event that was raised (e.g., quot;clickquot;). type A function is static and is invoked without creating an instance of the object Based on Microsoft AJAX Library 1.0 • Compiled by Milan Negovan • www.AspNetResources.com • Last update: 2007-01-24