Found 2417 Articles for HTML

HTML DOM Input FileUpload required Property

karthikeya Boyini
Updated on 30-Jun-2020 15:52:19

175 Views

The HTML DOM input FileUpload required property returns and modify the value of required attribute of a file upload input button in HTML.SyntaxFollowing is the syntax −1. Returning requiredobject.required2. Modifying requiredobject.required = true|falseExampleLet us see an example of HTML DOM input file upload required property − Live Demo HTML DOM file upload required Property    body{       text-align:center;    }    .btn{       display:block;       margin:1rem auto;       background-color:#db133a;       color:#fff;       border:1px solid #db133a;       padding:0.5rem;       border-radius:50px;       ... Read More

HTML DOM Input FileUpload value Property

Sharon Christine
Updated on 30-Jul-2019 22:30:26

89 Views

The HTML DOM input FileUpload value property returns the content of the value attribute of file upload input button.SyntaxFollowing is the syntax −object.valueExampleLet us see an example of input FileUpload value property − Live Demo HTML DOM name Property    body{       background-color:#397367;       color:#fff;       padding:20px;    }    .btn{       display:block;       background-color:#22223B;       color:#fff;       border:none;       padding:0.5rem;       border-radius:50px;       width:80%;       margin:10px;    }    .show-value{       font-weight:bold;   ... Read More

HTML DOM Input FileUpload form Property

Sharon Christine
Updated on 30-Jul-2019 22:30:26

91 Views

The HTML DOM input FileUpload form property returns the reference of the form which enclose the file upload input button.SyntaxFollowing is the syntax −object.formExampleLet us see an example of input FileUpload form property − Live Demo    body{       text-align:center;       background-color:#363946;       color:#fff;    }    form{       margin:2.5rem auto;    }    button{       background-color:#db133a;       border:none;       cursor:pointer;       padding:8px 16px;       color:#fff;       border-radius:5px;       font-size:1.05rem;    }    .show{     ... Read More

HTML DOM Input FileUpload name Property

Sharon Christine
Updated on 30-Jul-2019 22:30:26

61 Views

The HTML DOM FileUpload name property returns and modify the value of the name attribute of an fileupload input type in HTML.SyntaxFollowing is the syntax −1. Returning nameobject.name2. Setting nameobject.name=”text”ExampleLet us see an example of FileUpload name property − Live Demo HTML DOM name Property    body{       background-color:#397367;       color:#fff;       padding:20px;    }    .btn{       display:block;       background-color:#22223B;       color:#fff;       border:none;       padding:0.5rem;       border-radius:50px;       width:80%;       margin:10px;    }   ... Read More

HTML DOM Input FileUpload files Property

Sharon Christine
Updated on 30-Jul-2019 22:30:26

104 Views

The HTML DOM FileUpload files property returns a FileList object which contains all the files that are selected by the file upload button.SyntaxFollowing is the syntax −object.filesExampleLet us see an example of FileUpload files property − Live Demo    body{       text-align:center;       background-color:#52B2CF;       color:#fff;    }    .btn{       background-color:coral;       border:none;       height:2rem;       border-radius:50px;       width:60%;       margin:1rem auto;       display:block;       color:#fff;       outline:none;    }    .show{   ... Read More

HTML DOM Input FileUpload disabled Property

karthikeya Boyini
Updated on 30-Jul-2019 22:30:26

424 Views

The HTML DOM FileUpload disabled property returns and modify the value of disabled attribute of a FileUpload input type in HTML.SyntaxFollowing is the syntax −1. Returning disabledobject.disabled2. Setting disabledobject.disabled = true|false;ExampleLet us see an example of HTML FileUpload disabled property − Live Demo    body{       background-color:#397367;       color:#fff;       padding:10px;    }    p{       font-size:1.2rem;    }    input{       width:200px;       border:none;       margin:10px 0;    }    .btn{       display:block;       margin:10px 0;       ... Read More

HTML DOM Option text Property

karthikeya Boyini
Updated on 30-Jul-2019 22:30:26

100 Views

The HTML DOM option text property returns and modify the text of an option in the HTML document.SyntaxFollowing is the syntax −1. Returning textobject.text2. Modifying textobject.text = “text”ExampleLet us see an example of HTML DOM option text property − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: radial-gradient( circle farthest-corner at 23.1% 64.6%, rgba(129, 125, 254, 1) 0%, rgba(111, 167, 254, 1) 90% ) no-repeat;       height:100%;    }    p{       font-weight:700;       font-size:1.1rem;   ... Read More

HTML DOM Images Collection Property

karthikeya Boyini
Updated on 30-Jul-2019 22:30:26

102 Views

The HTML DOM image collection property returns the collection of all HTML element in the HTML document.SyntaxFollowing is the syntax −document.imagesPropertiesFollowing is the property of DOM Images Collection −PropertyExplanationlengthIt returns the number of HTML element in the HTML document.MethodsFollowing are the methods of DOM Images CollectionMethodExplanation[index]It returns the specified index element from the collectionitem(index)It returns the specified index element from the collection.namedItem(id)It returns the specified id element from the collection.ExampleLet us see an example of DOM images collection property − Live Demo    body{       text-align:center;    }    .btn{   ... Read More

HTML DOM Image Object

karthikeya Boyini
Updated on 30-Jul-2019 22:30:26

356 Views

The HTML DOM image Object represents the element of an HTML document.Let us create an img object −SyntaxFollowing is the syntax −document.createElement(“IMG”);PropertiesFollowing are the properties of image Object −PropertyExplanationaltIt returns and modify the value of the alt attribute of an image HTML element.completeIt returns whether the browser finished loading an image in HTML web page or not.crossOriginIt returns and modify the CROS setting of an image HTML element.heightIt returns and modify the value of the height attribute of an image HTML element.naturalHeightIt returns the natural height of an image in HTML document.naturalWidthIt returns the natural width of an image ... Read More

HTML DOM iFrame Object

Sharon Christine
Updated on 30-Jul-2019 22:30:26

133 Views

The HTML DOM iframe Object represents the element of an HTML document.Let us now create iframe object −SyntaxFollowing is the syntax −document.createElement(“IFRAME”);PropertiesFollowing are the properties of iframe Object −PropertyExplanationcontentDocumentIt returns the document object generated by an iframe HTML element.contentWindowIt returns the window object generated by an iframe HTML element.heightIt returns and modify the value of height attribute of an iframe HTML element.nameIt returns and modify the value of the name attribute of an iframe HTML element.sandboxIt returns and alter the value of sandbox attribute of an iframe HTML element.seamlessIt returns and modify whether the iframe should look seamless like ... Read More

Advertisements