DOM Articles

Page 2 of 4

HTML DOM TableHeader abbr Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 97 Views

The HTML DOM TableHeader abbr property sets or returns the value of the abbr attribute of a table header cell ( element). The abbr attribute provides a short abbreviation or description for the header cell content, which is helpful for screen readers and accessibility tools. Syntax Following is the syntax for getting the abbr value − object.abbr Following is the syntax for setting the abbr value − object.abbr = "text" Parameters text − A string value that specifies the abbreviation or short description for the table header cell. ...

Read More

HTML DOM Textarea cols Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 165 Views

The HTML DOM Textarea cols property gets and sets the value of the cols attribute of a textarea element. The cols attribute specifies the visible width of a textarea in average character widths. The cols property is useful for dynamically adjusting textarea dimensions through JavaScript, allowing you to change the visual width of text areas based on user interactions or content requirements. Syntax Following is the syntax to return the cols value − textareaObject.cols Following is the syntax to set the cols value − textareaObject.cols = number Here, number ...

Read More

HTML ondrop Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 196 Views

The HTML ondrop event attribute is triggered when a draggable element or text is dropped on a valid drop target in an HTML document. This event is part of the HTML5 drag and drop API, which enables interactive user interfaces where elements can be moved between different areas of a webpage. Syntax Following is the syntax for the ondrop event attribute − Where script is the JavaScript code to execute when the drop event occurs. Parameters The ondrop event handler receives an event object with the following key properties − ...

Read More

HTML onmouseup Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 184 Views

The HTML onmouseup event attribute is triggered when a mouse button is released from an HTML element. This event occurs after the mouse button has been pressed down and then released, making it useful for implementing interactive click behaviors and drag-and-drop functionality. Syntax Following is the syntax for the onmouseup event attribute − Content Where script is the JavaScript code to execute when the mouse button is released over the element. How onmouseup Works The onmouseup event is part of the mouse event sequence. When you interact with an element using a ...

Read More

HTML onmousedown Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 237 Views

The HTML onmousedown event attribute is triggered when a mouse button is pressed down on an HTML element. This event fires immediately when the user presses any mouse button (left, right, or middle) while the cursor is over the element, before the button is released. Syntax Following is the syntax for the onmousedown event attribute − Where script is the JavaScript code to execute when the mouse button is pressed down on the element. Parameters The onmousedown event attribute accepts the following parameter − script − JavaScript code or ...

Read More

HTML onmousemove Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 218 Views

The HTML onmousemove event attribute is triggered when the user moves the mouse pointer over an HTML element. This event fires continuously while the mouse is in motion over the target element, making it useful for tracking cursor movement and creating interactive hover effects. Syntax Following is the syntax for the onmousemove event attribute − Where script is the JavaScript code to execute when the mouse moves over the element. Parameters The onmousemove event attribute accepts the following parameter − script − JavaScript code or function call to execute ...

Read More

HTML onmouseout Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 196 Views

The HTML onmouseout event attribute is triggered when the mouse pointer moves out of an HTML element. This event is commonly used to reset styles, hide tooltips, or perform cleanup actions when users move their cursor away from an element. Syntax Following is the syntax for the onmouseout event attribute − Content Where script is the JavaScript code to execute when the mouse leaves the element. Parameters script − JavaScript code or function call that executes when the mouse pointer moves out of the element. Example − Circle Color ...

Read More

HTML DOM Textarea disabled Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 204 Views

The HTML DOM Textarea disabled property is used to get or set whether a textarea element is disabled. When disabled, the textarea cannot receive user input and appears grayed out to indicate its inactive state. Syntax Following is the syntax for returning the disabled status − object.disabled Following is the syntax for setting the disabled status − object.disabled = true | false Return Value The property returns a Boolean value − true − The textarea is disabled false − The textarea is enabled (default) Example ...

Read More

HTML onmouseover Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 653 Views

The HTML onmouseover event attribute is triggered when the mouse pointer moves over an HTML element. This event is commonly used to create interactive effects, show tooltips, highlight elements, or change visual appearance when users hover over content. Syntax Following is the syntax for the onmouseover event attribute − Content Where script is the JavaScript code to execute when the mouse enters the element area. Basic Example Following example demonstrates a simple onmouseover event that changes text color when hovering − HTML onmouseover Event ...

Read More

HTML returnValue Event Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 172 Views

The HTML returnValue event property is a legacy property that was used to control whether an event's default action should be prevented. While it has been deprecated in favor of the preventDefault() method, it is still supported in some browsers for backward compatibility. Syntax Following is the syntax for getting the returnValue property − event.returnValue Following is the syntax for setting the returnValue property − event.returnValue = boolean Parameters The returnValue property accepts a boolean value − true − Allows the event's default action to proceed (default ...

Read More
Showing 11–20 of 36 articles
Advertisements