Found 88 Articles for DOM

HTML DOM Textarea defaultValue Property

AmitDiwan
Updated on 16-Feb-2021 05:37:40

71 Views

The HTML DOM Textarea defaultValue property returns and modify the default value of a text area element in an HTML document.SyntaxFollowing is the syntax −1. Returning defaultValueobject.defaultValue2. Adding defaultValueobject.defaultValue = “text”Let us see an example of HTML DOM Textarea defaultValue Property:ExampleLive Demo    body {       color: #000;       background: lightseagreen;       height: 100vh;    }    .btn {       background: #db133a;       border: none;       height: 2rem;       border-radius: 2px;       width: 40%;       display: block;       ... Read More

HTML DOM Textarea disabled Property

AmitDiwan
Updated on 16-Feb-2021 05:35:42

93 Views

The HTML DOM Textarea disabled property returns and modify whether the text area element in an HTML document is disabled or not.SyntaxFollowing is the syntax −1. Returning disabledobject.disabled2. Adding disabledobject.disabled = true | falseLet us see an example of HTML DOM Textarea disabled Property:ExampleLive Demo    body {       color: #000;       background: lightseagreen;       height: 100vh;    }    .btn {       background: #db133a;       border: none;       height: 2rem;       border-radius: 2px;       width: 40%;       display: block;       color: #fff;       outline: none;       cursor: pointer;    } DOM Textarea disabled Property Demo Disable Textarea    function set() {       document.querySelector("textarea").disabled = true;    } OutputClick on “Disable Textarea” button to disabled the textarea element.

HTML DOM Textarea placeholder Property

AmitDiwan
Updated on 16-Feb-2021 05:11:34

104 Views

The HTML DOM Textarea placeholder property returns and modify the value of placeholder attribute of a text area element in an HTML document.SyntaxFollowing is the syntax −1. Returning placeholderobject.placeholder2. Adding placeholderobject.placeholder = “text”Let us see an example of HTML DOM Textarea placeholder Property:ExampleLive Demo    body {       color: #000;       background: lightseagreen;       height: 100vh;    }    .btn {       background: #db133a;       border: none;       height: 2rem;       border-radius: 2px;       width: 40%;       display: block;   ... Read More

HTML DOM Textarea rows Property

AmitDiwan
Updated on 16-Feb-2021 05:13:29

65 Views

The HTML DOM Textarea rows returns and modify the value of rows attribute of a text area element in an HTML document.SyntaxFollowing is the syntax −1. Returning rowsobject.rows2. Adding rowsobject.rows = “number”Let us see an example of HTML DOM Textarea rows Property:ExampleLive Demo    body {       color: #000;       background: lightseagreen;       height: 100vh;    }    .btn {       background: #db133a;       border: none;       height: 2rem;       border-radius: 2px;       width: 40%;       display: block;     ... Read More

HTML DOM Textarea cols Property

AmitDiwan
Updated on 16-Feb-2021 05:15:30

61 Views

The HTML DOM Textarea cols return and modify the value of cols attribute of a text area element in an HTML document.SyntaxFollowing is the syntax −1. Returning colsobject.cols2. Adding colsobject.cols = “number”Let us see an example of HTML DOM Textarea cols Property:ExampleLive Demo    body {       color: #000;       background: lightseagreen;       height: 100vh;    }    .btn {       background: #db133a;       border: none;       height: 2rem;       border-radius: 2px;       width: 40%;       display: block;     ... Read More

HTML DOM Textarea Object

AmitDiwan
Updated on 16-Feb-2021 05:18:54

325 Views

The HTML DOM Textarea Object represent the element of an HTML document.Create Textarea objectSyntaxFollowing is the syntax −document.createElement(“TEXTAREA”);Properties of Textarea objectPropertyExplanationautofocusIt returns and modify whether the text area should automatically get focused or not when the page loads.defaultValueIt returns and modify the default value of a text area element in an HTML document.colsIt returns and modify the value of cols attribute of a text area element in an HTML document.disabledIt returns and modify whether the text area element in an HTML document is disabled or notformIt returns the cite of the form which enclose the text area.maxLengthIt returns and ... Read More

HTML DOM TableHeader abbr Property

AmitDiwan
Updated on 20-Sep-2019 10:43:20

28 Views

The HTML DOM TableHeader abbr property returns and modify the value of abbr attribute of a table in an HTML document.SyntaxFollowing is the syntax −1. Returning abbrobject.abbr2. Adding abbrobject.abbr = “text”Let us see an example of abbr property:Example Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;       text-align: center;    }    table {       margin: 2rem auto;       width: 400px;    }    .btn {       background: #db133a;       border: none;       height: 2rem; ... Read More

HTML DOM TableRow Object

AmitDiwan
Updated on 20-Sep-2019 10:39:14

56 Views

The HTML DOM TableRow Object represent the element of an HTML document.Create TableRow objectSyntaxFollowing is the syntax −document.createElement(“TR”);Properties of TableRow objectPropertyExplanationrowIndexIt returns the position of a row in the rows collection of a table.sectionRowIndexIt returns the position of a row in the rows collection of a thead, tbody, or tfoot.Methods of TableRow objectMethodExplanationdeleteCell()It removes a cell from the current table row.insertCell()It adds a cell into the current table row.Let us see an example of TableRow object:Example Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;     ... Read More

HTML DOM TableHeader Object

AmitDiwan
Updated on 20-Sep-2019 10:32:21

49 Views

The HTML DOM TableHeader Object represent the element of an HTML document.Create TableHeader objectSyntaxFollowing is the syntax −document.createElement(“TH”);Properties of TableHeader objectPropertyExplanationcellIndexIt returns the position of a cell in the cell collection of a table row.colSpanIt returns and alter the value of colspan attribute of a table.headersIt returns and alter the value of headers attribute of a table.abbrIt returns and alter the value of abbr attribute of a table.rowSpanIt returns and alter the value of rowspan attribute of a tableLet us see an example of TableHeader object:Example Live Demo    body {       color: #000;     ... Read More

HTML DOM TableData Object

AmitDiwan
Updated on 20-Sep-2019 10:25:05

59 Views

The HTML DOM TableData Object represent the element of an HTML document.Create TableData objectSyntaxFollowing is the syntax −document.createElement(“TD”);Properties of TableData objectPropertyExplanationcellIndexIt returns the position of a cell in the cell collection of a table row.colSpanIt returns and alter the value of colspan attribute of a table.headersIt returns and alter the value of headers attribute of a table.rowSpanIt returns and alter the value of rowspan attribute of a table.Let us see an example of TableData object −Example Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;     ... Read More

Advertisements