Front End Technology Articles - Page 554 of 860

HTML DOM Input Text type Property

AmitDiwan
Updated on 30-Jul-2019 22:30:26

232 Views

The HTML DOM Input Text type property returns/sets type of Input Text.SyntaxFollowing is the syntax −Returning string valueinputTextObject.typeSetting type to string valueinputTextObject.type = stringValueString ValuesHere, “stringValue” can be the following −stringValueDetailsemailIt defines that input type is emailtextIt defines that input type is textradioIt defines that input type is radiotelIt defines that input type is tel and a number keypad is shown for inputExampleLet us see an example of Input Text type property − Live Demo Input Text type    form {       width:70%;       margin: 0 auto;       text-align: center;    } ... Read More

HTML DOM Input Text size Property

AmitDiwan
Updated on 30-Jul-2019 22:30:26

204 Views

The HTML DOM Input Text size property returns/sets the size property for input text. If not defined this property returns ‘20’.SyntaxFollowing is the syntax −Returning size attributeinputTextObject.sizeSet size property to a numberinputTextObject.size = numberExampleLet us see an example of Input Text size property − Live Demo Input Text size    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    } Text-size ... Read More

HTML DOM Input FileUpload autofocus Property

AmitDiwan
Updated on 30-Jul-2019 22:30:26

125 Views

The HTML DOM Input FileUpload autofocus property sets/returns whether Input FileUpload is focused upon initial page load.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputFileUploadObject.autofocusSetting autofocus to booleanValueinputFileUploadObject.autofocus = booleanValueBoolean ValuesHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that input will be autofocused on page load.falseIt is the default value and input is not autofocused.ExampleLet us see an example of Input FileUpload autofocus property − Live Demo Input FileUpload autofocus    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px; ... Read More

HTML DOM Input FileUpload accept Property

AmitDiwan
Updated on 30-Jul-2019 22:30:26

122 Views

The HTML DOM Input FileUpload accept property returns a string, which is the value of the accept attribute of FileUpload. User can also set it to a new value.SyntaxFollowing is the syntax −Returning string valueinputFileUploadObject.acceptSetting value attribute to a string valueinputFileUploadObject.accept = valueExampleLet us see an example of Input FileUpload accept property − Live Demo Input FileUpload accept      form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"]{       ... Read More

HTML DOM Input Email value Property

AmitDiwan
Updated on 30-Jul-2019 22:30:26

158 Views

The HTML DOM Input Email value property returns a string, which is the value attribute of input Email. User can also set it to a new string.SyntaxFollowing is the syntax −Returning string valueinputEmailObject.valueSetting value attribute to a string valueinputEmailObject.value = ‘String’ExampleLet us see an example of Input Email value property − Live Demo Input Email value    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;   ... Read More

HTML DOM Input Email type Property

AmitDiwan
Updated on 30-Jul-2019 22:30:26

128 Views

The HTML DOM Input Email type property returns/sets type of Input Email.SyntaxFollowing is the syntax −Returning string valueinputEmailObject.typeSetting type to string valueinputEmailObject.type = stringValueString ValuesHere, “stringValue” can be the following −stringValueDetailsemailIt defines that input type is emaildatetime-localIt defines that input type is datetime-localradioIt defines that input type is radiotelIt defines that input type is tel and a number keypad is shown for inputExampleLet us see an example of Input Email type property − Live Demo Input Email type    form {       width:70%;       margin: 0 auto;       text-align: center;    } ... Read More

What is the use of Higher-order functions in JavaScript?

Lokesh Yadav
Updated on 08-Dec-2022 07:47:19

1K+ Views

In this article we are going to discuss the use of Higher-order functions in JavaScript. A higher order function is simply, a function that accepts other functions as parameters and/or returns a function. To know about Higher-order functions, we should learn about call back functions. A call back function is a function that is passed to another function as an argument. With the help of call back functions, one function can call another function and the call back function runs only after other function has finished. Some of the higher-order functions are map, reduce and filter. In order to understand ... Read More

How to clone an object using spread operator in JavaScript?

Manisha Patil
Updated on 04-Aug-2022 11:55:49

2K+ Views

The spread operator, which was first introduced in ES6, is used to unpack the elements of an iterable like an array. Cloning and merging the array is simple thanks to the spread operator. The spread operator could not be used with objects when it was first introduced in ES6. The spread operator was eventually extended to objects in ES2018. You'll learn how to use the JavaScript object spread (...) to clone an object or merge two objects into one in this article. In areas where 0+ arguments are expected, the spread operator allows an iterable to extend. This is most ... Read More

HTML DOM Table Object

AmitDiwan
Updated on 30-Jul-2019 22:30:26

774 Views

The HTML DOM table Object represent the element of an HTML document.Let us see how to create table objectSyntaxFollowing is the syntax −document.createElement(“TABLE”);PropertiesFollowing are the properties of table object −PropertyExplanationcaptionIt returns element of a table in an HTML document.tFootIt returns element of a table in an HTML document.tHeadIt returns element of a table in an HTML document.MethodsFollowing are the methods of table object −MethodExplanationcreateCaption()It generates an empty element and adds it to the table.createTFoot()It generates an empty element and adds it to the table.createTHead()It generates an empty element and adds it to the ... Read More

HTML DOM Summary Object

AmitDiwan
Updated on 30-Jul-2019 22:30:26

87 Views

The HTML DOM summary Object represent the element of an HTML document.Let us now see how to create summary object −SyntaxFollowing is the syntax −document.createElement(“SUMMARY”);ExampleLet us see an example of HTML DOM summary object − Live Demo    body {       text-align: center;       background-color: #fff;       color: #0197F6;    }    h1 {       color: #23CE6B;    }    .btn {       background-color: #fff;       border: 1.5px dashed #0197F6;       height: 2rem;       border-radius: 2px;       width: 60%; ... Read More

Advertisements