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
Web Development Articles
Page 9 of 801
HTML DOM Location host Property
The HTML DOM Location host property returns or sets the hostname and port number of the current URL. This property combines both the hostname (like www.example.com) and port number (like 8080) in the format hostname:port. If no port is specified in the URL, only the hostname is returned. Syntax Following is the syntax for getting the host property − location.host Following is the syntax for setting the host property − location.host = "hostname:port" Return Value The location.host property returns a string containing the hostname and port number. If the ...
Read MoreHTML DOM Location href Property
The HTML DOM Location href property returns or sets the complete URL of the current page. This property provides access to the entire URL including protocol, hostname, port, path, search parameters, and fragment identifier. Syntax Following is the syntax for getting the href property − location.href Following is the syntax for setting the href property − location.href = "URL" Parameters The location.href property accepts the following parameter when setting a value − URL − A string representing the complete URL to navigate to. This can be an ...
Read MoreHTML DOM Location search Property
The Location search property returns or sets the query string portion of a URL, including the leading question mark (?). This property allows you to read the search parameters from the current URL or programmatically modify them. Syntax Following is the syntax for getting the search property − location.search Following is the syntax for setting the search property − location.search = searchString Parameters searchString − A string representing the query parameters, including the leading question mark. For example: "?name=john&age=25" Return Value Returns a string containing the query ...
Read MoreHTML DOM Anchor rel Property
The HTML DOM Anchor rel property returns or sets the rel attribute of an anchor element. The rel attribute specifies the relationship between the current document and the linked document, providing semantic meaning to links for browsers, search engines, and assistive technologies. Syntax Following is the syntax to return the rel property − anchorObject.rel Following is the syntax to set the rel property − anchorObject.rel = "value" Parameters The value parameter accepts a string containing one or more space-separated link types. Common values include − nofollow − ...
Read MoreHTML DOM Anchor search Property
The HTML DOM Anchor search property returns or sets the query string part of an anchor element's href attribute. The query string is the portion of a URL that comes after the question mark (?) and contains parameters passed to the server, typically used in GET requests. Syntax Following is the syntax for returning the search property − anchorObject.search Following is the syntax for setting the search property − anchorObject.search = querystring Parameters querystring − A string representing the query string portion of the URL, including the ...
Read MoreHTML DOM Anchor target Property
The HTML DOM anchor target property specifies where to open the linked document when a user clicks on an anchor element. This property corresponds to the target attribute in HTML and can be accessed or modified using JavaScript. The target property can have the following values − _blank − Opens the linked document in a new window or tab. _self − Opens the linked document in the same frame (this is the default). _parent − Opens the linked document in the parent frame. _top − Opens the linked document in the full body of the window. framename ...
Read MoreHTML DOM Anchor username Property
The HTML DOM anchor username property is used to set or return the username portion of a URL in an anchor element's href attribute. The username appears in URLs that use basic authentication format: protocol://username:password@hostname. Syntax Following is the syntax for returning the username property − anchorObject.username Following is the syntax for setting the username property − anchorObject.username = "newUsername" Parameters The username property accepts a string value representing the username portion of the URL. When setting this property, it modifies only the username part while keeping the rest ...
Read MoreHTML DOM AnimationEvent
The HTML DOM AnimationEvent is a JavaScript object that handles events occurring during CSS animations. It provides detailed information about animation-related events and offers greater control over CSS animations by describing which events triggered specific animations. Properties The AnimationEvent object contains three main properties − Property Description animationName Returns the name of the CSS animation being executed. elapsedTime Returns the time elapsed since the animation started running, measured in seconds. pseudoElement Returns the name of the pseudo-element where the animation occurs (e.g., ::before, ::after, ::first-line). Returns ...
Read MoreHTML DOM Base href Property
The HTML DOM Base href property is used to get or set the value of the href attribute of the element. The tag specifies the base URL for all relative URLs in an HTML document, and there can be a maximum of one tag per document. Syntax Following is the syntax for setting the href property − baseObject.href = URL Following is the syntax for returning the href property − baseObject.href Here, URL is a string representing the base URL for relative URLs in the document. ...
Read MoreHTML DOM cite object
The HTML DOM cite object is associated with the HTML element. The element is used to reference creative works like books, movies, paintings, songs, or research papers. When rendered, browsers typically display cite content in italics to distinguish it from regular text. Syntax Following is the syntax for creating a cite object using JavaScript − var citeElement = document.createElement("CITE"); Following is the syntax for the HTML element − Title of creative work Properties and Methods The cite object inherits all standard HTML DOM element properties and ...
Read More