Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by AmitDiwan
Page 257 of 840
HTML DOM Input Time value Property
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 MoreHTML DOM console.error() Method
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 MoreHTML DOM Video paused Property
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 MoreHTML DOM Input URL autocomplete Property
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 MoreHow to prevent buttons from submitting forms in HTML?
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 MoreHTML DOM Input URL autofocus Property
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 MoreHTML DOM console.group() Method
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 MoreHTML DOM Input URL defaultValue Property
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 MoreHTML DOM Input Radio autofocus property
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 MoreHow do I create an HTML button that acts like a link?
Creating an HTML button that behaves like a link allows developers to combine the visual appeal of buttons with the navigation functionality of links. This technique is useful when you want a more prominent, clickable element that stands out better than traditional text links. There are three main approaches to create HTML button links − Using the tag − Wrapping a button inside an anchor element Using the tag − Creating a form with a submit button that navigates to a URL Using JavaScript onclick event − Adding click handlers to buttons for programmatic navigation ...
Read More