Calculate Internet Connection Speed using JavaScript
In this article, we are providing you with a code snippet which you can include in any webpage where you want to display the internet speed in Mbps. Basic Idea : The basic idea here is to load an image and see how much time it takes to load the image…
Access Camera and Read QR code using JavaScript
In this tutorial, we are going to create a QR Reader using JavaScript and HTML5. JavaScript enables us to access the camera and then we can easily scan the QR code to get the message in the QR Code. We can create our own QR Code Reader using JavaScript…
Draggable HTML Element using pure JavaScript
In this article, we are going to learn to create a draggable HTML element with pure JavaScript and no use of any other libraries or plugins. Source Code : <!DOCTYPE html> <html> <style> #mydiv { position: absolute; z-index: 9;…
Random Background Color using JavaScript
In this post, we will be writing a simple JavaScript function that will generate random color which we set as the background of webpage. Source Code : <body onclick="changeColor();"> </body> <script type="text/javascript"> function…
Bulb On/Off Effect using JavaScript
In this tutorial, we will be using JavaScript to create a bulb on/off effect in a webpage. The following source code uses two identical bulb images one in on state while the other in off state. You can use the following images for the bulb : Full Source…
Cool Trick : Like all Facebook posts at once
In this article, we are going to learn a cool trick in Facebook using JavaScript. We are going to write a couple of lines of JavaScript codes which will like all the Facebook posts in the current browser. Like all posts var like_buttons =…
Detect whether Internet speed is Fast or Slow using JavaScript
In this article, we are providing you with a code snippet which you can include in any webpage where you want to display internet speed whether it is slow or fast. This feature can be useful if you webpage contains some element that needs a better…
Design Full Page Overlay Advertisement using HTML, CSS and JavaScript
Most of the websites nowadays are attracted to full page overlay ads for promoting third party as well as their own content in the websites. In this article, we have a code snippet which you can include in any webpage where you want to display the…
How to detect AdBlocker using JavaScript ?
Ad blocking or ad filtering is a software capability for removing or altering online advertising in a web browser or an application. An ad blocker is a program that will remove different kinds of advertising from a Web user’s experience online.…
Responsive FileManager as Standalone File Manager
In this post, we are going to implement Responsive FileManager as a standalone filemanager. We will be using JQuery along with Fancybox JavaScript and CSS for this. Source Code : <link rel="stylesheet"…
Play Musical Notes with JavaScript
In music, a note is a symbol denoting a musical sound. In English usage a note is also the sound itself. Notes can represent the pitch and duration of a sound in musical notation. How cool it would be if we could play musical notes using JavaScript ? In…
Generate Random String using JavaScript
In this post, we will be writing a simple JavaScript function that will generate random string of desired length. We can generate a random string with fixed set of characters using simple match and string functions. <script> function…
Find and Replace Text using JavaScript
In this post, we will be writing a simple JavaScript function to find and replace certain text in a HTML element. Source Code : <div id="haystack"> By 55,000 years ago, the first modern humans, or Homo sapiens, had arrived on the Indian…
Generate random integer between two numbers using JavaScript
Random number generation is the generation of a sequence of numbers or symbols that cannot be reasonably predicted better than by a random chance, usually through a random-number generator (RNG). Computer random number generators are important in…
Add Source Link or Copyright Note When Someone Copies Text from your website
The following post shows a simple JavaScript code to add link for reference when someone copies text from your website. You can just copy paste the following code to your webpage and add the link to the copied content. $(document).on('copy',…