Shubham Vora has Published 957 Articles

How to handle tabs, line breaks and whitespace in a text in JavaScript?

Shubham Vora

Shubham Vora

Updated on 15-Sep-2022 12:08:54

2K+ Views

In this tutorial, we will learn how to handle tabs, line breaks, and whitespace in a text in JavaScript. To handle tabs, line breaks, and whitespace in text in JavaScript, we can use the whiteSpace property. This property has seven attributes − normal nowrap pre pre-line pre-wrap initial inherit ... Read More

How to play a multimedia file using JavaScript?

Shubham Vora

Shubham Vora

Updated on 15-Sep-2022 12:02:02

1K+ Views

In this tutorial, we will learn how to play a multimedia file using JavaScript. The multimedia file is the audio and video files. The multimedia files can be of different formats. wav and mp3 are two examples of audio file formats, whereas mp4 and mkv are examples of video file ... Read More

How to pass JavaScript Variables with AJAX calls?

Shubham Vora

Shubham Vora

Updated on 15-Sep-2022 11:53:13

10K+ Views

In this tutorial, we will learn how to pass JavaScript Variables with AJAX calls. AJAX stands for Asynchronous JavaScript and XML. As the name suggests, it performs asynchronous operations on your web page. AJAX communicates with the server by HTTP requests and gets the required data as an HTTP response. ... Read More

How to get the value of the target attribute of a link in JavaScript?

Shubham Vora

Shubham Vora

Updated on 15-Sep-2022 11:48:20

7K+ Views

In this tutorial, we will learn how to get the value of the target attribute of a link in JavaScript. The target attribute specifies where to open the linked document or page. By default, its value is set to ‘_self, ’ which means the linked document should open ... Read More

How to get the number of seconds between two Dates in JavaScript?

Shubham Vora

Shubham Vora

Updated on 15-Sep-2022 11:43:13

21K+ Views

In this tutorial, we will learn how to get the number of seconds between two dates with JavaScript. There are different methods for checking the number of days, hours, and seconds that are commonly used to provide information related to data. Since you can’t manually change the count of the ... Read More

How to preselect a