Found 6685 Articles for Javascript

Visually improving a website using JavaScript?

Kalyan Mishra
Updated on 28-Dec-2022 11:42:05

390 Views

In this article, you will get to know about various techniques using which you can make your website attractive and fast. Which will increase user engagement and make your website productive. Let’s first get to know about JavaScript. What is JavaScript? JavaScript is one of the web development languages used to add functionality to the website. It makes the website interactive, robust, faster, and prettier. It's a scripting, interpreted language that can be directly compiled in a web browser like C, or CPP; it doesn't need a compiler to compile. This is the reason behind it turning out to be ... Read More

Display selected checkboxes on another page using JavaScript?

Kalyan Mishra
Updated on 28-Dec-2022 11:39:13

3K+ Views

In this article, you will learn about how to get all the checked boxes on the other page using JavaScript. The checkbox is a type of selection that is a type of binary selection either true or false. It is an option of GUI form present on the page and using this we can take more input from the user. If a box is checked, it indicates true, which means that the user has selected the value and in case the box is unmarked then it indicates that the user has not selected the value. The difference between the checkbox ... Read More

How to change video playing speed using JavaScript?

Manisha Patil
Updated on 12-Dec-2022 14:40:51

3K+ Views

In this article let us understand how to use an HTML5 video tag to alter the playing speed of videos that are embedded in an HTML document. A number less than 1 slows down the video, a number greater than 1 accelerates the video, and then a number of 1 returns the video to its original pace. Also take note that playbackRate is a property and not an HTML attribute. Although you wouldn't want to change the playback rate for every video site, you can do this if you think your visitors will prefer it. This only takes one HTML ... Read More

Why is JavaScript considered a loosely-typed language

Manisha Patil
Updated on 12-Dec-2022 14:30:47

2K+ Views

Since JavaScript is a loosely typed language, you are not required to correctly predict the kind of data that will be kept in a variable. Depending on the information you supply to a variable (such as this ‘ ‘ or " " to signify string values), JavaScript will automatically type it. The type of a variable, such as int, float, boolean, or String, must be declared in many other languages, including Java. This has both good and bad effects. Even though the type system in JavaScript allows for a lot of freedom, it lacks the ability of a highly typed ... Read More

What is the use of stopPropagation method in JavaScript

Manisha Patil
Updated on 12-Dec-2022 14:24:55

514 Views

The stopPropagation() methods will be covered in this article along with a useful sample of the code. After that, we'll look at the difference between stopPropagation() and PreventDefault() Methods. stopPropagation() event method − The parent element cannot access the event using this method. In general, this function is created to prevent multiple calls to the same event from propagating. For example, if a button element is contained within a div tag and both of them have a onclick event, anytime we attempt to activate the event associated with the button element, the event associated with the div element is also ... Read More

What is the role of deferred scripts in JavaScript?

Manisha Patil
Updated on 12-Dec-2022 14:21:48

2K+ Views

We must be aware of the JavaScript application's loading speed while running any script on an HTML page. Performance problems never cause harm to the programme. When we include a tag inside the HTML tag, the programme uses more memory and performs worse. The location on the HTML page where we add our script also affects how quickly the programme loads. Therefore, to enhance the performance of the application, include the defer attribute within the script> element using the syntax . defer attribute loads to promptly free up the necessary resources and boost efficiency. A boolean type attribute ... Read More

Unit Testing Challenges with Modular JavaScript Patterns

Manisha Patil
Updated on 12-Dec-2022 14:16:24

247 Views

First let us understand what unit testing is and how it helps us. One of the numerous varieties of automated testing is unit testing. Unit tests completely isolate and test relatively small portions of the application, comparing the results to the intended results. When unit testing your application, you normally don't link it to external dependencies like databases, the filesystem, or HTTP services. This is referred to as "full isolation." Since they won't fail as a result of issues with all those external services, unit tests can be quicker and more reliable as a result. Individual software units, such as ... Read More

Target a Window Using JavaScript or HTML

Manisha Patil
Updated on 12-Dec-2022 14:12:21

2K+ Views

In this article we will learn how to use the TARGET attribute to open a website in a new window using HTML and JavaScript TARGET attribute of HTML A link's opening named frame or window is specified using the Target attribute of the anchor tag. The concluding tag in the HTML content must appear after each commencing tag since the element is paired. Although the href (hypertext reference) element of the anchor tag has several other options, it is required since it contains the URL of the webpage where the link will go when clicked. Syntax ... Read More

Implement Green Screen Algorithm using JavaScript

Manisha Patil
Updated on 12-Dec-2022 14:06:27

730 Views

The green background image is changed and replaced with any effect or other image using the green screen algorithm, also referred to as the chromakey algorithm. In short, what we're doing is swapping out all of the green pixels in the forward image with their matching counterparts in the background image. Additionally, we need to keep in mind that the size of the output image should match that of the forward image. In the following step, the pixels from the forward image are duplicated into the new image. Rather than copying green pixels, the backdrop image's matching pixels are used. ... Read More

How to prevent sticky hover effects for buttons on touch devices?

Manisha Patil
Updated on 09-Dec-2022 12:53:47

1K+ Views

In touch devices, an element sticks when a hover effect is added to it using CSS. This article will teach us how to deal with this problem. On touch devices, there is no hover effect, therefore the button stays in its original state. Without the Use of JavaScript: CSS's media query function can be used to fix the problem. Devices that support hover are those that match the requirement "hover: hover". To ensure that the CSS below is added only on these devices, use media query along with this condition. Only hover-enabled devices will see the added hover effect; touch ... Read More

Advertisements