Anjana

Anjana

32 Articles Published

Articles by Anjana

32 articles

How to merge table columns in HTML?

Anjana
Anjana
Updated on 16-Mar-2026 68K+ Views

To merge table columns in HTML, use the colspan attribute in the or tag. This attribute allows a cell to span across multiple columns, effectively merging them together. The value of colspan specifies how many columns the cell should span. Syntax Following is the syntax for merging table columns using the colspan attribute − Content Content Where number represents the number of columns the cell should span across. Basic Table Structure Let us first create a basic 3x3 table to understand the structure before applying column merging − ...

Read More

How to create arrays in JavaScript?

Anjana
Anjana
Updated on 15-Mar-2026 510 Views

JavaScript provides multiple ways to create arrays. Arrays are used to store multiple values in a single variable and can hold different data types. Using Array Literal (Recommended) The most common and recommended way to create arrays is using square brackets: Array Literal Example var animals = ["Dog", "Cat", "Tiger"]; var numbers ...

Read More

What is the usage of onhashchange event in JavaScript?

Anjana
Anjana
Updated on 15-Mar-2026 217 Views

The onhashchange event occurs when the anchor part (hash) of the URL changes. This event is useful for creating single-page applications where different URL fragments represent different views or states. Syntax window.onhashchange = function() { // Code to execute when hash changes }; // Or using addEventListener window.addEventListener('hashchange', function() { // Code to execute when hash changes }); Example: Basic Hash Change Detection Change to #about Change to #contact ...

Read More

What is the usage of onreset event in JavaScript?

Anjana
Anjana
Updated on 15-Mar-2026 434 Views

The onreset event is triggered when a form is reset using a reset button or the reset() method. This event allows you to execute JavaScript code when users clear form data. Syntax // form elements // Or using addEventListener form.addEventListener('reset', functionName); Example: Basic onreset Event onreset Event Example function resetFunct() { alert("The form was ...

Read More

How to integrate Google AdSense into your webpage?

Anjana
Anjana
Updated on 15-Mar-2026 507 Views

If your website has sufficient content and good page views, you can start adding advertisements to earn money. Google AdSense is a free and easy way to monetize your website by displaying targeted ads. Integrating Google AdSense involves both account setup and technical implementation. Let's explore the complete process. Setting Up Your AdSense Account Follow these steps to create and configure your AdSense account: Go to the official AdSense website and sign in with your Google Account. Set up your account with all required details including website ...

Read More

What is the role of screenX Mouse Event in JavaScript?

Anjana
Anjana
Updated on 15-Mar-2026 209 Views

The screenX mouse event property returns the horizontal coordinate of the mouse pointer relative to the user's screen when an event is triggered. This is useful for tracking precise mouse positions across the entire screen. Syntax event.screenX Return Value Returns a number representing the horizontal distance in pixels from the left edge of the user's screen to the mouse pointer position. Example Click anywhere on the paragraph below to see the mouse coordinates displayed: ...

Read More

How to Scroll to the top of the page using JavaScript/ jQuery?

Anjana
Anjana
Updated on 15-Mar-2026 313 Views

Scrolling to the top of a page is a common user experience feature that improves navigation, especially on long pages. JavaScript and jQuery provide several methods to achieve smooth scrolling to the top. Using jQuery animate() Method The most popular approach uses jQuery's animate() method to create a smooth scrolling effect: body { height: 2000px; padding: 20px; } #scrollBtn { position: fixed; bottom: 20px; right: 20px; padding: ...

Read More

Why do we use a plus sign in front of function name in JavaScript?

Anjana
Anjana
Updated on 15-Mar-2026 374 Views

The +function() {} notation is primarily used to force the parser to treat whatever follows the + as an expression. This is commonly used for Immediately Invoked Function Expressions (IIFEs). The Problem Without + Without the plus sign, JavaScript interprets a function declaration, which cannot be immediately invoked: // This causes a syntax error function() { console.log("Demo!"); }(); Using + to Create an IIFE The + operator converts the function declaration into an expression, allowing immediate invocation: IIFE with Plus Sign ...

Read More

Usage of rest parameter and spread operator in JavaScript?

Anjana
Anjana
Updated on 15-Mar-2026 387 Views

Rest parameters and spread operators use the same three-dot syntax (...) but serve different purposes. Rest parameters collect multiple arguments into an array, while spread operators expand arrays or objects into individual elements. Rest Parameters Rest parameters allow functions to accept an indefinite number of arguments as an array. They must be the last parameter in a function's parameter list. Syntax function functionName(...parameterName) { // parameterName is an array containing all arguments } Example ...

Read More

Using an Angular app as SAP Fiori application

Anjana
Anjana
Updated on 13-Mar-2026 779 Views

When moving to SAP, whether it's SAP HANA Cloud platform or a backend SAP system, you can continue with your HTML Angular application by connecting to the backend via an OData service. Angular is a powerful JavaScript framework that adds numerous features to your application. However, one important consideration is that if you are planning to use Fiori Launchpad, integration could present challenges. What is SAP Fiori Launchpad? SAP Fiori Launchpad is a shell that hosts SAP Fiori applications and provides centralized access ...

Read More
Showing 1–10 of 32 articles
« Prev 1 2 3 4 Next »
Advertisements