How to open an URL in a new tab using JavaScript
Today, we’ll explain to you how to open an URL in a new tab using JavaScript. In the HTML, using the target=”_blank” attribute in anchor tag (<a>), we can easily...
Today, we’ll explain to you how to open an URL in a new tab using JavaScript. In the HTML, using the target=”_blank” attribute in anchor tag (<a>), we can easily...
Today, we’ll explain to you how to remove all whitespace from a string in JavaScript. Replacing whitespace or blank space from a string is a common task. We can easily...
Today, we’ll explain to you how to combine two strings in JavaScript. We can assign a string to a variable and combine the variable with another string. Here, we will...
In this short article, we’ll show you how to disable the browser back button using JavaScript. Sometimes we need to prevent the user from going back to the previous page...
In this short article, we will show you how to remove the first element from an array in JavaScript. Here, we’ll discuss about the two different methods to remove the...
In this article, we’ll discuss how to copy text to the clipboard using JavaScript. Generally, Ctrl + C keyboard shortcut is used to copy text to the clipboard for the...
Today we’ll show you how to get the last N number of elements from an array in JavaScript. There are multiple ways to get last N number of items from...
In this short article, we’ll explain how to remove the leading zero from a number in JavaScript. Sometimes we need to delete leading zero from string numbers. JavaScript has built-in...
Today we’ll show you how to get the first N number of elements from an array in JavaScript. There are multiple ways to get N number of items from an...
In this short article, we’ll explain to you how to get yesterday’s, today’s, and tomorrow’s date using Javascript. Using the Date object, we can easily calculate the date in JavaScript....
Today we’ll explain to you how to convert PHP array to JavaScript array. Sometimes, we need to pass a PHP array in JavaScript that can be a single or multidimensional...
Today we’ll show you how to convert text field value to uppercase while typing using jQuery, JavaScript, and CSS. We may need to get the user’s data in uppercase such...
Today we’ll show you how to generate a random password using JavaScript. Here, we’ll show you the most popular two methods to generate a random strong password using JavaScript. Ways...
Today we’ll show you how to convert a 12 hour format to 24 hour format using JavaScript. Here we will show you the conversion using custom function and Moment.js function....