Found 10483 Articles for Web Development

HTML DOM Event type Property

AmitDiwan
Updated on 30-Oct-2019 06:10:14

127 Views

The HTML DOM Event type property returns a string corresponding to the event’s type such as click, keypress, load, or touchend.Following is the syntax −Returning number of seconds a transition has run −event.typeLet us see an example of Event type property −Example Live Demo HTML DOM Event type    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }    .playArea {       ... Read More

HTML DOM TransitionEvent Object

AmitDiwan
Updated on 30-Oct-2019 06:05:46

93 Views

The HTML DOM TransitionEvent Object represents an event which incurs on a transition.Here, “TransitionEvent” can have the following properties and methods −Property/MethodDescriptionpropertyNameItreturns returns astring corresponding to a CSS property used for transition when atransition event is triggeredelapsedTimeItreturns a numbercorresponding to how many seconds a transition had run when atransition event is triggeredpseudoElementItreturns a nameof the pseudo-element of the transitionLet us see an example of TransitionEvent elapsedTime property −Example Live Demo TransitionEvent elapsedTime    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       ... Read More

HTML DOM TransitionEvent propertyName Property

AmitDiwan
Updated on 30-Oct-2019 06:00:35

83 Views

The HTML DOM TransitionEvent propertyName property returns a string corresponding to a CSS property used for transition when a transition event is triggered.Following is the syntax −Returning CSS property that transition has used −transitionEvent.propertyNameLet us see an example of TransitionEvent propertyName property −Example Live Demo TransitionEvent propertyName    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }    #playArea {       display: ... Read More

HTML DOM TransitionEvent elapsedTime Property

AmitDiwan
Updated on 30-Oct-2019 05:57:29

63 Views

The HTML DOM TransitionEvent elapsedTime property returns a number corresponding to how many seconds a transition had run when a transition event is triggered.Following is the syntax −Returning number of seconds a transition has run −transitionEvent.elapsedTimeLet us see an example of TransitionEvent elapsedTime property −Example Live Demo TransitionEvent elapsedTime    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }    #playArea {     ... Read More

HTML DOM Track srclang Property

AmitDiwan
Updated on 18-Feb-2021 05:11:49

93 Views

The HTML DOM Track srclang property sets/returns a value corresponding to the language of text track.Following is the syntax −Returning string valuetrackObject.srclangSetting srclang to stringValuetrackObject.srclang = stringValueLet us see an example of Track srclang property −ExampleLive Demo Track srclang    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }                    Track-srclang                                                                          var divDisplay = document.getElementById("divDisplay");    var trackSelect = document.getElementsByTagName("track");    function getTrackDetails() {       for(var i=0; i

HTML DOM Track src Property

AmitDiwan
Updated on 18-Feb-2021 05:13:19

125 Views

The HTML DOM Track src property sets/returns the value of src attribute of track element to specify the URL for track.Following is the syntax −Returning string valuetrackObject.srcSetting src to stringValuetrackObject.src = URLLet us see an example of Track src property −ExampleLive Demo Track src    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }                    Track-src                                                                              var divDisplay = document.getElementById("divDisplay");    var trackSelect = document.getElementsByTagName("track");    function getTrackDetails() {       for(var i=0; i

HTML DOM Track Object

AmitDiwan
Updated on 18-Feb-2021 05:13:58

179 Views

The HTML DOM Track Object in HTML represents the element.Creating a elementvar trackObject = document.createElement(“TRACK”)Here, “trackObject” can have the following properties −PropertyDescriptiondefaultItsets/returns the default state of a trackkindItsets/returns the value of the kind attribute of the tracklabelItsets/returns the value of the label attribute of the trackreadyStateItreturns the current state of the track resourcesrcItsets/returns the value of the src attribute of the tracksrclangItsets/returns the value of the srclang attribute of the tracktrackItreturns a TextTrack object representing the track element's texttrack dataLet us see an example of Track kind property −Example Live Demo Track kind    form {   ... Read More

HTML DOM Track label Property

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

115 Views

The HTML DOM Track label property sets/returns the value of label attribute of track element to specify the visible text for track.Following is the syntax −Returning string valuetrackObject.labelSetting label to stringValuetrackObject.label = labelValueLet us see an example of Track label property −Example Track label    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }                    Track-label                                                                              var divDisplay = document.getElementById("divDisplay");    var trackSelect = document.getElementsByTagName("track");    function getTrackDetails() {       for(var i=0; i

HTML DOM Track kind Property

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

116 Views

The HTML DOM Track kind property sets/returns the value of kind attribute of track element to specify the type of text track.Following is the syntax −Returning string valuetrackObject.kindSetting kind to stringValuetrackObject.kind = stringValueHere, “stringValue” can be the following −stringValueDetailscaptionsThe captions are translationof dialogue and sound effects (preferable for deaf users)chaptersIt defines the chaptertitles (used for navigating the media resource)descriptionsIt defines a textualdescription of the video content (preferable for blind users)metadataIt is not visible to theuser and content is used by scriptssubtitlesIt is used to displaysubtitles in a videoLet us see an example of Track kind property −Example Live Demo ... Read More

HTML DOM Track default Property

AmitDiwan
Updated on 29-Oct-2019 10:56:18

113 Views

The HTML DOM Track default property sets/returns a boolean value corresponding to whether the track is to enabled until the user’s preference contradicts it.NOTE: Only one track should be default per media (audio/video) element.Following is the syntax −Returning boolean value - true/falsetrackObject.defaultSetting default to booleanValuetrackObject.default = booleanValueHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that track willbe default enabledfalseIt defines that track willnot be enabled unless user prefers toLet us see an example of Track default property −Example Live Demo Track default    form {       width:70%;       margin: 0 auto;       text-align: ... Read More

Advertisements