Found 10710 Articles for Web Development

Difference between document load and DOMContentLoaded events in JavaScript

Naveen Singh
Updated on 09-Dec-2022 11:56:11

3K+ Views

To verify whether a webpage has fully loaded, use the DOMContentLoaded and load events. However, there are some elements that influence people's choice for one over the other. Let's have a look at both of them and see how they function. The basic HTML page is loaded and its parsing is completed when the DOMContentLoaded event is fired. Stylesheets, sub-frames, and other add-ons like photos and pictures are not delayed by this event until they have finished loading. When a page has loaded completely, a different event called load should be invoked. When DOMContentLoaded is more appropriate, it is a ... Read More

Design Smiley Face Eyes that follow Mouse Cursor using CSS and JS

Naveen Singh
Updated on 09-Dec-2022 11:47:30

796 Views

A face that is animated using JavaScript, HTML, and CSS. The face will move in the same direction as the cursor. This is one of the basic CSS and JavaScript effects. It is among the best examples for learning the idea of pseudo-elements for a newcomer. When it comes to arranging and structuring website pages, CSS is far more useful and essential. A website page can now have more capabilities and collaborations because of JavaScript's continued development. CSS is supported by every software, however JavaScript is only supported by functional programmes. You can use JavaScript to create responses for particular ... Read More

Build a Site Bookmark App with JavaScript by using Local Storage

Naveen Singh
Updated on 09-Dec-2022 11:41:27

1K+ Views

In this tutorial, we'll use JavaScript, CSS, and HTML to build a Site Bookmark app. Through the use of our browser's local storage, we will be able to store links to our favourite websites without having to use any databases. We can store data client-side thanks to Local Storage, also referred to as the web storage API. Strings are used to represent the data in local storage, which is persistent even when the session is closed. Data can only be deleted manually by the user. Since all of the data is stored on the client side, there is a clear ... Read More

Setting up a Poster for a Video in Video.js Player

Naveen Singh
Updated on 08-Dec-2022 07:19:25

5K+ Views

In this tutorial, we're going to learn how to set up a poster image for a video player created using video.js. Video.js is a very popular and well-known open-source HTML video player framework. It supports a lot of video formats, from standard video formats like mp4, WebM, Flv, etc to other modern video playback formats like YouTube, Vimeo, twitch, etc. Video.js is so widely accepted because of the flexibility, customizations, and support it provides while creating a video player. For the purpose of this tutorial, we're going to change the look of our video player by adding a poster image ... Read More

How to speed up/down the video in Video.js Player?

Naveen Singh
Updated on 04-Apr-2023 14:02:19

1K+ Views

In this tutorial, we're going to learn how to speed up a video or speed down a video using video.js. Video.js is a widespread and open-source HTML5 video player framework. It allows video playback on a variety of platforms with varying screen sizes, such as desktop computers and mobile devices. The project, which began in the middle of 2010, already has hundreds of contributors and is utilized on over 450, 000 websites. Apart from this, Video.js also gives a variety of options for changing and customizing the video players to your preference. For the purpose of this tutorial, we're going ... Read More

Why split the <script> tag when writing it with document.write()?

Naveen Singh
Updated on 07-Dec-2022 11:12:25

996 Views

In this tutorial, we will learn why to split the tag when writing it with the document.write(). The script tag in HTML is added to execute JavaScript code on the webpage. The JavaScript programs must be enclosed with the script tag to execute. There are many methods in JavaScript that add HTML content to the page, like the document.write() method. The document.write() method is used to delete all the content from the HTML tag or the document and add the content specified in this method to the page. Because of performance degradation and errors in certain conditions, this method ... Read More

How to stop refreshing the page on submit in JavaScript?

Naveen Singh
Updated on 02-Sep-2023 11:31:26

77K+ Views

In this tutorial, we shall learn to stop form refreshing the page on submitting in JavaScript. Let’s cover the methods to accomplish this objective. Using event.preventDefault() to stop page refresh on form submit In this section, we will see how to use event.preventDefault() to stop page refresh on form submission. The event.preventDefault() restricts the default page refresh behavior of the form during form submission. Users can follow the syntax below to try this method. Syntax The syntax defines the form. //Get form element var form=document.getElementById("formId"); function submitForm(event){ ... Read More

POST unchecked HTML checkboxes

Naveen Singh
Updated on 07-Dec-2022 10:14:03

4K+ Views

In this tutorial, we will learn to POST unchecked HTML checkboxes. To interact with a user, it is necessary to take their input or data through the website. The HTML forms are used to take input from the user. Forms are essential to take the data of the user on the website. These forms take input from the user and send data to the server using HTTP requests. There are two types of HTTP requests one is GET, and the other is POST. The POST request is the most used type because it is secure and can send a large ... Read More

How to include another HTML file in an HTML file?

Naveen Singh
Updated on 06-Sep-2023 21:51:46

52K+ Views

In this tutorial, we shall learn to include another HTML file in an HTML file. Various methods are available to include another HTML file in an HTML file. Let us quickly go through the techniques that have support on the web. Using JQuery load to include an HTML file In this section, we shall check how to use JQuery’s load method to include an HTML file. Users can follow the syntax below to use this method. Syntax $(wrapper).load(htmlfile); The wrapper appends the new HTML file that jQuery loads. Parameters wrapper − ID of the DOM element that includes ... Read More

How to set up different languages in Video.js player?

Naveen Singh
Updated on 08-Dec-2022 06:59:38

1K+ Views

In this tutorial, we'll learn how to set up different languages for our video player created using the video.js library. Video.js is a very popular JavaScript package used to build web browser video players for a number of video formats. It supports all modern video formats, including YouTube, Vimeo, and Flash, along with all standard video playback formats, including mp4, WebM, Flv, and others. Video.js also provides a plethora of options to change and customize the video players as per your liking. In this tutorial, we're going to have a look at how to change the language of our video ... Read More

Advertisements