Articles on Trending Technologies

Technical articles with clear explanations and examples

HTML DOM Input Time type Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 288 Views

The HTML DOM Input Time type property returns or sets the type attribute of an HTML input element that accepts time values. This property allows you to dynamically change or retrieve the input type using JavaScript, providing flexibility in form handling and validation. Syntax Following is the syntax for returning the type value − inputTimeObject.type Following is the syntax for setting the type value − inputTimeObject.type = stringValue Parameters The stringValue parameter represents the type of input element. For time inputs, common values include − ...

Read More

HTML DOM Input Time value Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 189 Views

The HTML DOM Input Time value property is used to get or set the value of an HTML input element with type="time". This property returns a string in the format "HH:MM" (24-hour format) representing the selected time, or allows you to programmatically set a new time value. Syntax Following is the syntax for getting the value − inputTimeObject.value Following is the syntax for setting the value − inputTimeObject.value = "HH:MM" Parameters inputTimeObject − A reference to the HTML input element with type="time". "HH:MM" − A ...

Read More

HTML DOM console.error() Method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 181 Views

The HTML DOM console.error() method is used for writing an error message to the browser's console. This method is very useful for testing and debugging purposes, allowing developers to log error information that can be viewed in the browser's developer tools. Syntax Following is the syntax for console.error() method − console.error(message) Parameters The console.error() method accepts the following parameter − message − A JavaScript string, object, or any value that needs to be displayed as an error message in the console. This parameter is required. Return Value ...

Read More

HTML DOM Video paused Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 178 Views

The HTML DOM Video paused property returns a boolean value indicating whether the video is currently paused or playing. This read-only property is true when the video is paused and false when it is playing. Syntax Following is the syntax to access the paused property − videoElement.paused Return Value The property returns a boolean value − true − The video is currently paused false − The video is currently playing Example − Basic Paused Property Check Following example demonstrates how to check if a video is paused using ...

Read More

HTML DOM Input URL autocomplete Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 201 Views

The HTML DOM Input URL autocomplete property controls whether the browser should automatically complete values based on previously entered data. When enabled, it displays suggestions from the user's browsing history as they type in a URL input field. Syntax Following is the syntax for getting the autocomplete property value − inputURLObject.autocomplete Following is the syntax for setting the autocomplete property − inputURLObject.autocomplete = value Property Values The autocomplete property accepts the following values − Value Description on Enables autocomplete functionality. The ...

Read More

How to prevent buttons from submitting forms in HTML?

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 3K+ Views

There are several ways to prevent buttons from submitting forms in HTML. The most common approaches involve using the onsubmit event handler, the event.preventDefault() method, or setting the button type attribute. These techniques are useful when you want to perform client-side validation, handle form data with JavaScript, or create interactive forms without page refreshes. Syntax Following are the main syntaxes for preventing form submission − Non-submitting Button Using the onsubmit Property with return false The onsubmit property can be used to prevent form submission by ...

Read More

HTML DOM Input URL autofocus Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 197 Views

The HTML DOM Input URL autofocus property sets or returns whether a URL input field should automatically get focus when the page loads. This property corresponds to the HTML autofocus attribute and allows dynamic control over input field focus behavior. Syntax Following is the syntax for getting the autofocus property value − inputURLObject.autofocus Following is the syntax for setting the autofocus property − inputURLObject.autofocus = booleanValue Parameters The booleanValue parameter can be one of the following − Value Description true The ...

Read More

HTML DOM console.group() Method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 215 Views

The HTML DOM console.group() method creates a collapsible group of console messages. All messages logged after calling this method appear indented under the group until console.groupEnd() is called. This helps organize related console output for better debugging and readability. Syntax Following is the syntax for the console.group() method − console.group([label]) Parameters The console.group() method accepts the following optional parameter − label − An optional string that acts as a label for the message group. If not provided, the group appears without a label. Return Value This method does ...

Read More

HTML DOM Input URL defaultValue Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 185 Views

The HTML DOM Input URL defaultValue property sets or returns the default value of a URL input field. The defaultValue represents the original value specified in the HTML value attribute and remains unchanged even when users modify the input field. This differs from the value property, which updates as the user types. Syntax Following is the syntax for returning the default value − inputURLObject.defaultValue Following is the syntax for setting the default value − inputURLObject.defaultValue = 'string' Parameters The defaultValue property accepts a string value representing the default URL. ...

Read More

HTML DOM Input Radio autofocus property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 356 Views

The HTML DOM Input Radio autofocus property is associated with the HTML element's autofocus attribute. This property sets or returns whether a radio button should automatically receive focus when the page loads. Syntax Following is the syntax for setting the autofocus property − radioObject.autofocus = true|false Following is the syntax for getting the autofocus property − var focusState = radioObject.autofocus; Parameters The autofocus property accepts boolean values − true − The radio button will automatically get focus when the page loads. false − The radio button ...

Read More
Showing 13261–13270 of 61,297 articles
Advertisements