Found 2202 Articles for HTML

HTML DOM touchmove Event

AmitDiwan
Updated on 08-Jul-2020 05:18:48

401 Views

The HTML DOM touchmove event is triggered when touch is moved across the touch screen.NOTE − This event is only for touch devices.Following is the syntax −Trigger touchmove event in HTML −ontouchmove = "eventFunction()"Trigger touchmove event in JavaScript −eventObject.ontouchmove = eventFunctionNote − 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 touchmove event property −Example Live Demo HTML DOM touchmove event    * {       padding: 2px; ... Read More

HTML DOM TouchEvent Object

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

155 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

108 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

94 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

84 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

65 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

75 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

305 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

233 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 Object

AmitDiwan
Updated on 29-Oct-2019 09:44:38

162 Views

The HTML DOM Title Object in HTML represents the element.Creating a elementvar titleObject = document.createElement(“TITLE”)Here, “titleObject” can have the following properties −PropertyDescriptiontextItsets/returns the value of the element of thedocumentLet 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

Advertisements