How-to articles, tricks, and solutions about JAVASCRIPT
Learn How to Redirect Mobile Devices With JavaScript and CSS. 1.JavaScript Method, 2. CSS @media Method. Fast solution for web developers.
If you want to create your own color generator using JavaScript, then you’re welcome to our tutorial. In this snippet, we are going to build a hex color generator step by step.
Read this tutorial and learn several CSS, JavaScript and jQuery methods of hiding and showing the <div> element. Also, you can find examples and try them.
Incorrect information leads to bad user interactions. So as to prevent this problem, read and learn how to validate forms with the help of JavaScript!
HTML5 range input type allows creating range sliders. Read the tutorial and learn a simple solution including a jQuery code to achieve the desired result!
Very often we need to check whether the element is in an array in JavaScript or not. In this snippet, we are going to learn some methods to do that.
If you have a content that will not function without JavaScript, you need to display a message with an explanation of the problem. In this snippet, we are going to have a look at 2 simple methods to display the content when JavaScript is turned off.
Learn how to create Modal Dialog with adding a bit of Javascript to your code. Create your code step by step and find examples!
There are 2 types of JavaScript comments: single-line and multi-line. See when to use them with examples, and also use comments to prevent execution when testing alternative code.
Learn the ways of how to disable text selection highlighting, how to disable copy, cut and paste, how to disable right-click. See example with CSS, JavaScript and jQuery.
To add new elements you can use the following JavaScript functions: push() unshift(), concat() function or splice(). See examples.
Read this tutorial and learn the two basic methods of declaring and initializing an Array in JavaScript. Also, read about the differences of the methods.
There are several methods of converting a string into a number: parseInt() #; parseFloat() #, Number() #, etc. See examples.
The most common ways to loop through an array in JavaScript are the for, for/in and while loops. See how to use them. Examples.
Read this tutorial and learn what several useful Array methods exist that will help you remove the specified element from an Array in JavaScript easily.
Read this tutorial and learn several methods used to check if a string contains another substring in JavaScript or not. Read information and see examples.
Read and learn how to get the current URL in JavaScript by using Location object properties. Also, gain an understanding about URL and its components.
To redirect a URL page with Javascript you need to set the window.location object. Learn how to do it.