Home

how to get the ISO week of year using javascript

If January 1st is Monday, Tuesday, Wednesday, Thursday, It's belong to first ISO weekElse if it's Friday, Saturday, Sunday ,then it belong to the week of last year.if (!Arr

Views:0  December 23, 2018, 8:31 pm

how to refresh the page after a few seconds

This tutorial explains how to refresh the page after a few seconds each time (certain interval time).Sometime we need to redirect the page to another one after 3 seconds.So we need to refresh the page

Views:0  March 23, 2019, 11:31 am

How to check if a string contains a substring in JavaScript

This tutorial explains how to check if string contains substring using js. this is a common task in work.There are many ways to do this operation. Usually, I would like to use String.indexOf() method.

Views:0  March 23, 2019, 3:08 pm

js common verify rule using regular expressions cheatsheet

When we design a form, the data must be verifyed before the user submit. Regular expressions can help us to do this task and impove the customer experience.Here is a list of most used rules in a valid

Views:0  March 23, 2019, 4:00 pm

How to keep your JavaScript code more safely

How to keep your javascript code more safelyObfuscating javascript used to be complex. However, with the help of javascript obfuscator,the process has become significantly easier.javascript obfuscator

Views:0  April 4, 2019, 11:57 pm

How to check if a variable is declared in JavaScript

Question: I use this to check if variable exists,but it's not work.  if(variable  !== undefined) // it don't workError: Uncaught Referenc

Views:0  April 12, 2019, 10:46 am

How to Capture the console log in javascript and redirect it to html page

To capture the console.log message,we can hijack the js function(function(){     var syslog = console.log; //get the original method

Views:0  April 12, 2019, 12:47 pm

How to detect the device location with js

The HTML API uses various sources of location information as GPS, IP address, WiFi, GSM, Bluetooth to get the position of the device.All you need to do is just writing a few lines of code.check if the

Views:0  April 15, 2019, 5:00 pm

how to load external javascript asynchronously

There are ways of loading of external javascript asynchronously.use HTML5 with async attribute<script src="//code.jquery.com/jquery-1.11.0.min.js" async><&#

Views:0  April 16, 2019, 11:43 am

How to remove item of a array in js

use splice methodIt can also be used to replace/delete/add one or more values in an array.splice(index,len,[item])index: from which itme to replace/deletelen: Length of substitution

Views:0  April 17, 2019, 11:56 pm

How to sleep delay wait between actions in Javascript

How to sleep/delay/wait between actions in javascriptwe can use settimeout to check the action states,then to delay between actions.The javascript setTimeout() allows code to be executed a s

Views:0  April 27, 2019, 1:41 pm