Javascript Articles

Page 311 of 534

With JavaScript RegExp search a hexadecimal number character.

Smita Kapse
Smita Kapse
Updated on 15-Mar-2026 471 Views

To find a hexadecimal number character with JavaScript Regular Expression, use the \x escape sequence followed by the two-digit hexadecimal value. Syntax \xdd Where dd represents the two-digit hexadecimal value (00-FF) of the character you want to match. Example: Searching for Hexadecimal Character The following example searches for hexadecimal number 53, which represents the character 'S': JavaScript Regular Expression ...

Read More

SharedArrayBuffer.byteLength Property in JavaScript

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 133 Views

The byteLength property of the SharedArrayBuffer returns an unsigned, 32-bit integer that specifies the size/length of a SharedArrayBuffer in bytes. Syntax sharedArrayBuffer.byteLength Parameters This property takes no parameters and is read-only. Return Value Returns the length of the SharedArrayBuffer in bytes as a 32-bit unsigned integer. Example JavaScript Example var sharedArrayBuffer = new SharedArrayBuffer(8); ...

Read More

How to load the next URL in the history list in JavaScript?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 857 Views

In this tutorial, we will learn to load the next page in the history list in JavaScript. The Window object in JavaScript accesses the window in the browser. This object contains many properties and methods required to do the tasks. The Window object also retrieves the information from the browser window. There is a history stack in every browser that saves the pages visited by the user. To access this history stack, we can use the history object that is the property of the Window object. By accessing the history from the browser, we can go to the ...

Read More

Which event occurs in JavaScript when a dragged element is dropped?

Swarali Sree
Swarali Sree
Updated on 15-Mar-2026 224 Views

The ondrop event occurs when a dragged element is successfully dropped on a valid drop target. This event is part of the HTML5 Drag and Drop API and must work together with ondragover to enable dropping functionality. How Drag and Drop Works The drag and drop process involves several events: ondragstart - When dragging begins ondragover - When dragged element is over a drop target ondrop - When element is dropped on target ondragend - When dragging operation ends Key Requirements For ondrop to work properly: The drop target must handle ondragover and ...

Read More

TypedArray.buffer property in JavaScript

Samual Sam
Samual Sam
Updated on 15-Mar-2026 107 Views

The buffer property of TypedArray instances provides access to the underlying ArrayBuffer object that stores the binary data for the typed array. Syntax typedArray.buffer Return Value Returns the ArrayBuffer object that backs the TypedArray instance. Example JavaScript Example var buffer = new ArrayBuffer(156); var float32 = new Float32Array(buffer); document.write("Buffer byte length: " + float32.buffer.byteLength); ...

Read More

How to return the "time" portion of the Date as a string using the current locale's conventions?

Priya Pallavi
Priya Pallavi
Updated on 15-Mar-2026 160 Views

To return the "time" portion of the Date as a string, using the current locale's conventions, use the toLocaleTimeString() method. The toLocaleTimeString() method relies on the underlying operating system in formatting dates. It converts the date to a string using the formatting convention of the operating system where the script is running. For example, in the United States, the time appears in 12-hour format with AM/PM, whereas in many European countries, it appears in 24-hour format. Syntax date.toLocaleTimeString([locales], [options]) Parameters locales (optional): A string or array of strings representing locale identifiers (e.g., ...

Read More

TypedArray.byteLength property in JavaScript

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 127 Views

The byteLength property of the TypedArray object represents the length of the TypedArray in bytes. It is a read-only property that returns the size of the underlying buffer used by the typed array. Syntax typedArray.byteLength Example: Basic Usage JavaScript Example var buffer = new ArrayBuffer(156); var float32 = new Float32Array(buffer); document.write("ByteLength: " + float32.byteLength); ...

Read More

How to return a string representing the source for an equivalent Date object?

Daniol Thomas
Daniol Thomas
Updated on 15-Mar-2026 148 Views

The toSource() method was a non-standard JavaScript method that returned a string representing the source code of a Date object. However, this method has been deprecated and removed from modern browsers. The Deprecated toSource() Method The toSource() method was originally available in Firefox but was never part of the ECMAScript standard. It would return a string that could theoretically recreate the Date object: // This method is deprecated and no longer works var dt = new Date(2018, 0, 15, 14, 39, 7); // dt.toSource() would have returned: (new Date(1516022347000)) Modern Alternatives Since toSource() ...

Read More

TypedArray.byteOffset property in JavaScript

Samual Sam
Samual Sam
Updated on 15-Mar-2026 114 Views

The byteOffset property of TypedArray returns the offset (in bytes) from the start of the ArrayBuffer where the typed array begins. Syntax typedArray.byteOffset Parameters This is a property, not a method, so it takes no parameters. Return Value Returns a number representing the byte offset from the beginning of the ArrayBuffer. Example 1: TypedArray at Buffer Start JavaScript byteOffset Example var buffer = new ArrayBuffer(16); ...

Read More

How to load the previous URL in the history list in JavaScript?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 7K+ Views

In this tutorial, we will learn to load the previous page in the history list in JavaScript. The Window object in JavaScript accesses the window in the browser. This object contains many properties and methods required to do the tasks. The Window object also retrieves the information from the browser window. There is a history stack in every browser that saves the pages visited by the user. To access this history stack, we can use the history object that is the property of the Window object. By accessing the history from the browser, we can go to the ...

Read More
Showing 3101–3110 of 5,340 articles
« Prev 1 309 310 311 312 313 534 Next »
Advertisements