Found 2416 Articles for HTML

HTML DOM Style animationName Property

AmitDiwan
Updated on 15-Feb-2021 06:22:56

38 Views

The animationName property is used for getting or setting the animation name for @keyframes’s reference.SyntaxFollowing is the syntax for −Setting the animationName property −object.style.animationName = "none|keyframename|initial|inherit"ValuesFollowing are the values −Sr.NoValues & Description1NoneIt is the default value mentioning there will be no animation.2keyframenameTo specify the keyframe name to bind the selector to.3initialFor setting this property to initial value.4inheritTo inherit the parent property value.ExampleLet us look at the example for the animationName property −Live Demo    div {       width: 60px;       height: 40px;       border: 10px groove fuchsia;       position: ... Read More

HTML DOM Style animationIterationCount Property

AmitDiwan
Updated on 15-Feb-2021 06:24:12

15 Views

The animationIterationCount property is used for setting or getting the number of times the animation will play.SyntaxFollowing is the syntax for −Setting the animationIterationCount property −object.style.animationIterationCount = "number|infinite|initial|inherit"ValuesFollowing are the values −Sr.NoValue & Description1numberNumeric value indicating the number of times the animation should be played. It is set to 1 by default.2infiniteThis makes the animation to play infinitely.3initialFor setting this property to initial value.4inheritTo inherit the parent property value.ExampleLet us look at an example for the animationIterationCount property −Live Demo    p {       color: black;       animation: shrink 3s;       ... Read More

HTML DOM Geolocation coordinates property

AmitDiwan
Updated on 20-Aug-2019 07:28:46

105 Views

The HTML DOM Geolocation coordinates property is used for getting a user’s device position and altitude on earth. The user have to approve that he wants to give coordinates before this property could work. This is done so that a user’s privacy isn’t compromised. This can be used for tracking various device's location.PropertiesFollowing are the coordinates property −Note − All these properties are read-only and their return type is double.Sr.NoProperty & Description1coordinates.latitudeTo return the device position’s latitude in decimal degrees.2coordinates.longitudeTo return the device position's longitude in decimal degrees3coordinates.altitudeTo return the position's altitude in meters, relative to sea level. It can ... Read More

HTML DOM fullscreenEnabled() method

AmitDiwan
Updated on 20-Aug-2019 07:20:46

48 Views

The HTML DOM fullscreenEnabled() method is used for specifying if the fullscreen mode is available or not for the current document. Its return type is boolean and is a read-only property. True is returned if the fullscreen mode is available otherwise it returns false. Different prefixes are used to make it work with your browser.SyntaxFollowing is the syntax for fullscreenEnabled() method −document.fullscreenEnabled()Let us look at an example for the fullscreenEnabled() method −Note − You will need to use your browser prefix for fullscreenEnabled() method to work. Check the note at the last to have your browser specific prefix.ExampleLet us see ... Read More

HTML DOM fullscreenElement property

AmitDiwan
Updated on 18-Feb-2021 09:18:18

103 Views

The HTML DOM fullscreenElement property is used for returning the element that is currently displayed in full screen mode. It will return null if the given element in not in fullscreen.SyntaxFollowing is the syntax for fullscreenElement property −document.fullscreenElementLet us look at an example of the fullscreenElement property −Note − This example only has standard syntax and browser prefix for Chrome, Safari and Opera. For your browser prefix, check the last section.ExampleLet us see an example −    function FullscreenEle() {       console.log(document.fullscreenElement || /*Standard Syntax*/       document.webkitFullscreenElement); /*For Chrome, Safari and Opera*/   ... Read More

HTML DOM forms collection

AmitDiwan
Updated on 15-Feb-2021 06:28:29

344 Views

The HTML DOM forms collection is used for returning all the form elements that are present inside the HTML document as a collection. The elements present in the collection are sorted and are presented in the same order as they appear in the HTML document.PropertiesFollowing are the properties for forms collection −PropertyDescriptionlengthIt is a read-only property returning the number of elements in the collection.MethodsFollowing are the methods for forms collection −MethodDescription[index]To return the element from the collection at the given index. Indexing starts from 0 and null is returned if the index is out of bound.item(index)To return the ... Read More

HTML DOM Form target property

AmitDiwan
Updated on 20-Aug-2019 07:00:30

176 Views

The HTML DOM Form target property is used for specifiying where the response should be displayed after the form data has been submitted. It could display in a new tab, current tab or a new window. The form target property set or gets the target attribute value.SyntaxFollowing is the syntax for −Setting the target property −formObject.target = "_blank|_self|_parent|_top|framename"Here, _blank will open the response in new window, _self will open the response in the same window; parent will open in the parent frame, _top will open in full window body and framename will open it in a specified named frame.ExampleLet us ... Read More

HTML DOM Form submit() method

AmitDiwan
Updated on 20-Nov-2023 12:33:44

1K+ Views

The HTML DOM Form submit() method is used for submitting the form data to the address specified by the action attribute. It acts as a submit button to submit form data and it doesn’t take any kind of parameters.SyntaxFollowing is the syntax for Form submit() method −formObject.submit()ExampleLet us look at an example for the Form submit() method −    form{       border:2px solid blue;       margin:2px;       padding:4px;    }    function ResetForm() {       document.getElementById("FORM1").reset();       document.getElementById("Sample").innerHTML="Form has been reset";    } ... Read More

HTML DOM Form reset() method

AmitDiwan
Updated on 18-Nov-2023 03:35:42

1K+ Views

The HTML DOM Form reset() method is used for resetting all the values of the form elements and displaying the default values that are specified using the value attribute of the form elements. It acts as a reset button to clear form data and it doesn’t take any kind of parameters. Syntax Following is the syntax for form reset() method − formObject.reset() Example Let us look at an example of the Form reset() method −    form{       border:2px solid blue;       margin:2px;       padding:4px;    } ... Read More

HTML DOM Style animationFillMode Property

AmitDiwan
Updated on 15-Feb-2021 06:31:33

23 Views

The animationFillMode property is used to specify how styles are applied outside the execution time i.e. after it has finished or if a delay has been specified. This is helpful in setting css animation style to an element before the animation has started and after it has ended.SyntaxFollowing is the syntax for −Setting the animationFillMode property −object.style.animationFillMode = "none|forwards|backwards|both|initial|inherit"ValuesFollowing are the values −ValueDescriptionnoneThis makes that the animation will not apply any styles to the target element before start or after the animation has ended.It is the default value.forwardsIt applies the last key-frame style to the target element after the animation ... Read More

Advertisements