Front End Scripts Articles

Page 43 of 47

Usage of CSS list-style-position property

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 106 Views

The list-style-position property controls whether list markers (bullets, numbers) appear inside or outside the content area of list items. Syntax list-style-position: inside | outside | initial | inherit; Values outside (default): Markers appear outside the content area inside: Markers appear inside the content area Example: Outside vs Inside Positioning .outside-list { list-style-position: outside; ...

Read More

ArrayBuffer.byteLength Property in JavaScript

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

ArrayBuffer object in JavaScript represents a fixed-length binary data buffer. The byteLength property of the ArrayBuffer returns an unsigned, 32-bit integer that specifies the size/length of the ArrayBuffer in bytes. Syntax arrayBuffer.byteLength Return Value Returns a number representing the length of the ArrayBuffer in bytes. This value is established when the ArrayBuffer is constructed and cannot be changed. Example: Basic Usage JavaScript ArrayBuffer Example var arrayBuffer = new ArrayBuffer(8); ...

Read More

ArrayBuffer.isView() function in JavaScript

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

The ArrayBuffer.isView() static method determines whether a given value is an ArrayBuffer view. ArrayBuffer views include typed arrays (like Int32Array, Float64Array) and DataView objects. Syntax ArrayBuffer.isView(value) Parameters value: The value to test whether it's an ArrayBuffer view. Return Value Returns true if the value is an ArrayBuffer view (typed array or DataView), false otherwise. Example 1: Testing Typed Arrays ArrayBuffer.isView() Example // Create typed arrays ...

Read More

ArrayBuffer.slice() function in JavaScript

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

The ArrayBuffer object in JavaScript represents a fixed-length binary data buffer. The slice() method creates a new ArrayBuffer containing a copy of the specified portion of the original buffer. Syntax arrayBuffer.slice(start, end) Parameters start (optional): The byte index where the slice begins (inclusive). Defaults to 0. end (optional): The byte index where the slice ends (exclusive). Defaults to buffer length. Return Value Returns a new ArrayBuffer containing the copied bytes from the specified range. Example: Basic ArrayBuffer Slicing ArrayBuffer Slice Example ...

Read More

Atomics.xor() function in JavaScript

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

The Atomic object of JavaScript is an object that provides atomic operations such as add, sub, and, or, xor, load, store etc. as static methods. These methods are used with SharedArrayBuffer objects for thread-safe operations in multi-threaded environments. The xor() function of the Atomics object accepts an array, position, and value, then performs a bitwise XOR operation on the value at the given position atomically. Syntax Atomics.xor(typedArray, index, value) Parameters typedArray - A shared integer typed array (Int8Array, Uint8Array, Int16Array, etc.) index - The position in the array to operate on value ...

Read More

How to reset or clear a form using JavaScript?

Prabhdeep Singh
Prabhdeep Singh
Updated on 15-Mar-2026 45K+ Views

This tutorial teaches us how to reset or clear a form using JavaScript. This option is very helpful for users when they have filled the wrong data and want to clear everything at once. The reset() method provides an efficient way to restore all form fields to their initial values. The reset() method is a built-in JavaScript function that clears all input fields in a form and restores them to their default values. Syntax document.getElementById("formId").reset(); // or document.forms["formName"].reset(); The getElementById() method retrieves the form element by its ID, and then reset() clears all form ...

Read More

How to add background music to your web page?

Vikyath Ram
Vikyath Ram
Updated on 15-Mar-2026 36K+ Views

To add background music on a web page, you can use the element or the legacy tag. The modern approach uses HTML5's element with the autoplay attribute to start music automatically when the page loads. For background music, set the audio player to be hidden by using CSS or by omitting controls. The loop attribute makes the audio repeat continuously. Always upload your music file to the server and reference it in the src attribute. Method 1: Using HTML5 Audio Element (Recommended) The element is the modern standard for embedding audio content: ...

Read More

How to find the value of a button with JavaScript?

Abhishek
Abhishek
Updated on 15-Mar-2026 32K+ Views

In this tutorial, we will learn how to find the value of a button with JavaScript. Button elements often have a value attribute that stores important data for form processing or identification purposes. JavaScript provides the value property to access this attribute programmatically. Understanding how to retrieve button values is essential when working with HTML forms and interactive web applications. Button value Property The button value property returns the value of the value attribute assigned to a button element. This property is commonly used to distinguish between multiple buttons or pass specific data when forms are submitted. ...

Read More

What are the advantages of CSS?

Ankitha Reddy
Ankitha Reddy
Updated on 15-Mar-2026 17K+ Views

CSS or Cascading Style Sheets is used to design web pages, helping web developers control the layout and other visual aspects of websites. Using CSS, you can control the color of text, the style of fonts, spacing between paragraphs, how columns are sized and laid out, and what background images or colors are used. In this article, we will discuss the various advantages of CSS and why it's essential for modern web development. Key Advantages of CSS 1. Consistent Design Across Multiple Pages CSS enables uniform design across an entire website. By creating an external stylesheet and linking ...

Read More

How can I set the default value for an HTML \'select\' element?

usharani
usharani
Updated on 15-Mar-2026 906 Views

To set the default value for an HTML element, we can use the HTML selected attribute. This attribute allows you to display a predefined option when the dropdown menu first loads. In this article, we'll explore different approaches to set default values for HTML select elements with practical examples. Using the selected Attribute The most common method is adding the selected attribute to the desired element: Default Select Value Select Your Course ...

Read More
Showing 421–430 of 465 articles
« Prev 1 41 42 43 44 45 47 Next »
Advertisements