Found 10483 Articles for Web Development

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

HTML DOM Table Object

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

766 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

81 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

HTML DOM Superscript Object

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

132 Views

The HTML DOM superscript Object represent the element of an HTML document.Let us see how to create superscript object −SyntaxFollowing is the syntax −document.createElement(“SUP”);ExampleLet us see an example of superscript 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

HTML DOM S Object

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

115 Views

The HTML DOM S Object represent the element of an HTML document.Let us create an s object −SyntaxFollowing is the syntax −document.createElement(“S”);ExampleLet us see an example of s object − Live Demo    body{       text-align:center;       background-color:#fff;       color:#0197F6;    }    h1{       color:#23CE6B;    }    .drop-down{       width:35%;       border:2px solid #fff;       font-weight:bold;       padding:8px;    }    .btn{       background-color:#fff;       border:1.5px dashed #0197F6;       height:2rem;       ... Read More

HTML DOM Subscript Object

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

121 Views

The HTML DOM Subscript Object represent the element of an HTML document.Let us see how to create subscript objectSyntaxFollowing is the syntax −document.createElement(“SUB”);ExampleLet us see an example of HTML DOM subscript 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

HTML DOM Input Email size Property

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

120 Views

The HTML DOM Input Email size property returns/sets the size property for input Email. If not defined, this property returns ‘20’.SyntaxFollowing is the syntax −Returning size attributeinputEmailObject.sizeSet size property to a numberinputEmailObject.size = numberExampleLet us see an example of Input Email size property − Live Demo Input Email size    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 required Property

AmitDiwan
Updated on 15-Jun-2020 12:41:16

128 Views

The HTML DOM Input Email required property determines whether Input Email is compulsory to set or not.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputEmailObject.requiredSetting required to booleanValueinputEmailObject.required = booleanValueBoolean valuesHere, “booleanValue” can be the following −booleanValueDetailstrueIt is compulsory to set the email field to submit form.falseIt is the default value and to set an email field is not compulsory.ExampleLet us see an example of Input Email required property − Live Demo Input Email required    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {   ... Read More

HTML DOM Input Email readOnly Property

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

103 Views

The HTML DOM Input Email readOnly property sets/returns whether Input Email can be modified or not.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputEmailObject.readOnlySetting readOnlyto booleanValueinputEmailObject.readOnly = booleanValueBoolean ValuesHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that the input email field is readOnly.falseIt defines that the input email field is not readOnly and can be modified.ExampleLet us see an example of Input Email readOnly property − Live Demo Input Email readOnly    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: ... Read More

HTML DOM Input Email placeholder Property

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

140 Views

The HTML DOM Input Email placeholder property sets/returns a string generally used to give hints to user of what the input text will look like.SyntaxFollowing is the syntax −Returning string valueinputEmailObject.placeholderSetting placeholder to stringValueinputEmailObject.placeholder = stringValueExampleLet us see an example of Input Email placeholder property − Input Email placeholder    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    } ... Read More

Advertisements