Skip to content

Tag Archives: JavaScript-Misc

Given an HTML element and the task is to determine whether its content is overflow or not using JavaScript. Approach: Select the element to check… Read More
To get file extensions using JavaScript, there are so many ways. The most useful ones are: split() and pop() method substring() and lastIndexOf() method match()… Read More
Suppose that a user creates a webpage. Now he has a webpage, which contains an IFrame and a Button. Once the user presses the button,… Read More
The iframe HTML element is often used to insert contents from another source. Contents which needs resizing is done indirectly using a div tag. The… Read More
Web workers are giving us the possibility to write multi-threaded Javascript, which does not block the DOM. Even the Asynchronous operations block the DOM to… Read More
The protocol, domain, and port of the current page can be found by two methods: Method 1: Using location.protocol, location.hostname, location.port methods: The location interface… Read More
Given a URL and the task is to add an additional parameter (name & value) to the URL using JavaScript. URL.searchParams: This readonly property of… Read More
We can write an inline IF statement in javascript using the methods described below. Method 1: In this method we write an inline IF statement… Read More
The job is to determine the caps lock is turned on or turned off using JavaScript and jQuery. Check caps lock is on/off using JavaScript:… Read More
Use HTML DOM stopPropagation() method to stop the event from propagating with inline onclick attribute which is described below: HTML DOM stopPropagation() Event Method: The… Read More
Sometimes you might be looking for some features to include into your web-app that should only be available to devices with a touch screen. You… Read More
In order to detect a device whether it is iOS or not. We’re going to Navigator platform and Navigator userAgent property. Navigator userAgent property This… Read More
There may arise cases when we need to check the browser being used. Some features of your website may not be supported in older browsers… Read More
The break statement, which is used to exit a loop early. A label can be used with a break to control the flow more precisely.… Read More
In order to encode/decode a string in JavaScript, We are using built-in functions provided by JavaScript. btoa(): This method encodes a string in base-64 and… Read More

Start Your Coding Journey Now!