Found 2416 Articles for HTML

HTML DOM TouchEvent Object

AmitDiwan
Updated on 29-Oct-2019 10:38:57

104 Views

The HTML DOM TouchEvent Object represents an event which incurs on interaction with the HTML document elements using touch devices.Here, “TouchEvent” can have the following properties and methods −Property/MethodDescriptionaltKeyItreturns a Booleanvalue corresponding to the state if alt key was pressed when atouch event was firedchangedTouchesItreturns aTouchList object corresponding to a list of all contact pointstriggered on a state change of touch eventsctrlKeyItreturns a Booleanvalue corresponding to the state if ctrl was pressed when a touchevent was firedmetaKeyItreturns a Booleanvalue corresponding to the state if meta was pressed when a touchevent was firedshiftKeyItreturns a Booleanvalue corresponding to the state if shift ... Read More

HTML DOM TouchEvent touches Property

AmitDiwan
Updated on 18-Feb-2021 05:16:12

51 Views

The HTML DOM TouchEvent touches property returns a TouchList object corresponding to a list of all contact points triggered on a touch surface.NOTE: If a touch is triggered on the specified node or any of its child nodes then the following touches will count even if they are not triggered on the same node.Following is the syntax −Returning TouchList objectevent.touchesNote: We ran Touch event examples on Online HTML Editors accessed on Mobile or systems with touch access. This is done so that we can perform touch operations like touch the screen for 2 seconds.Let us see an example of TouchEvent ... Read More

HTML DOM TouchEvent shiftKey Property

AmitDiwan
Updated on 29-Oct-2019 10:17:44

52 Views

The HTML DOM TouchEvent shiftKey property returns a Boolean value corresponding to the state if shift was pressed when a touch event was fired.Following is the syntax −Returning boolean value - true/falsetouchEvent.shiftKeyHere, “booleanValue” can be the following −booleanValueDetailstrueIt definesthat shift key was pressed when touch event occurredfalseIt definesthat shift key was not pressed when touch event occurredNote: We ran Touch event examples on Online HTML Editors accessed on Mobile or systems with touch access. This is done so that we can perform touch operations like touch the screen for 2 seconds.Let us see an example of TouchEvent shiftKey property −Example Live ... Read More

HTML DOM TouchEvent metaKey Property

AmitDiwan
Updated on 21-Dec-2021 10:03:16

42 Views

The HTML DOM TouchEvent metaKey property returns a Boolean value corresponding to the state if meta was pressed when a touch event was fired.Following is the syntax −Returning boolean value - true/falsetouchEvent.metaKeyHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that meta key waspressed when touch event occurredfalseIt defines that meta key wasnot pressed when touch event occurredNote: We ran Touch event examples on Online HTML Editors accessed on Mobile or systems with touch access. This is done so that we can perform touch operations like touch the screen for 2 seconds.Let us see an example of TouchEvent metaKey property −Example ... Read More

HTML DOM TouchEvent ctrlKey Property

AmitDiwan
Updated on 29-Oct-2019 10:06:20

41 Views

The HTML DOM TouchEvent ctrlKey property returns a Boolean value corresponding to the state if ctrl was pressed when a touch event was fired.Following is the syntax −Returning boolean value - true/falsetouchEvent.ctrlKeyHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that ctrl key waspressed when touch event occurredfalseIt defines that ctrl key wasnot pressed when touch event occurredNote: We ran Touch event examples on Online HTML Editors accessed on Mobile or systems with touch access. This is done so that we can perform touch operations like touch the screen for 2 seconds.Let us see an example of TouchEvent ctrlKey property −Example Live ... Read More

HTML DOM TouchEvent altKey Property

AmitDiwan
Updated on 29-Oct-2019 10:01:46

38 Views

The HTML DOM TouchEvent altKey property returns a Boolean value corresponding to the state if alt key was pressed when a touch event was fired.Following is the syntax −Returning boolean value - true/falsetouchEvent.altKeyHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that alt key waspressed when touch event occurredfalseIt defines that alt key wasnot pressed when touch event occurredNote: We ran Touch event examples on Online HTML Editors accessed on Mobile or systems with touch access. This is done so that we can perform touch operations like touch the screen for 2 seconds.Let us see an example of TouchEvent altKey property ... Read More

HTML DOM touchend Event

AmitDiwan
Updated on 29-Oct-2019 09:56:55

219 Views

The HTML DOM touchend event is triggered when touch is removed from touch screen.NOTE: This event is only for touch devices.Following is the syntax −Trigger touchend event in HTML −ontouchend = "eventFunction()"Trigger touchend event in JavaScript −eventObject.ontouchend = eventFunctionLet us see an example of touchend event property −Example Live Demo HTML DOM touchend event    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 50%;     ... Read More

HTML DOM touchcancel Event

AmitDiwan
Updated on 21-Dec-2021 10:09:52

159 Views

The HTML DOM touchcancel event is triggered when one or more touch events are interrupted.NOTE: This event is only for touch devices.Following is the syntax −Trigger touchcancel event in HTML −ontouchcancel = "eventFunction()"Trigger touchcancel event in JavaScript −eventObject.ontouchcancel = eventFunctionLet us see an example of touchcancel event property −Example HTML DOM touchcancel event    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    } ... Read More

HTML DOM Title text Property

AmitDiwan
Updated on 29-Oct-2019 09:50:12

86 Views

The HTML DOM Title text property sets/returns the value of the element of the document.Following is the syntax −Returning string valuetitleElementObject.textSet text to a string valuetitleElementObject.text = stringLet us see an example of Title text property −Example Live Demo HTML DOM Title text    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }             ... Read More

HTML DOM title Property

AmitDiwan
Updated on 21-Dec-2021 10:13:24

121 Views

The HTML DOM title property returns/sets a string corresponding to the value of the title attribute of a HTML element. The title value shows up when hovering over HTML element.Following is the syntax −Returning string valueElementOfHTMLObject.titleSet title to a string valueElementOfHTMLObject.title = stringExampleLet us see an example of HTML DOM title property − HTML DOM title    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px; ... Read More

Advertisements