1. Several storage forms of HTML5 LocalStorage &&SSIONSTORAGE offline cache (Application Cache) IndexedDB and WebSQL2, LocalStorage &Q SessionStorastora
When writing js scripts, we often encounter situations where the object is empty or not an object. In this case, we can use if to judge it, and then execute the corresponding processing method. The specific methods to judge them are as follows: 1. if (typ
In JavaScript, extracting substrings mainly uses one of the three methods: Slice, Substring, and Substr. Copy the code as follows: // slice // Syntax: string.slice(start [, stop])"Good news,
1. Copy the code as follows:<script language="JavaScript"> javascript:window.history.forward(1); </script>Using JS to generate a "forward" action to offset the back function, this method
Before we start the formal introduction, we want to see what Javascript Promise looks like: the copy code is as follows: var p = new Promise(function(resolve, reject) {resolve("hello world");})
The code copy is as follows: function square(num){var total = num*num;//local variable return total;}var total = 50;//global variable var number = square(20);alert
Preface: Drawing multiple deformations with Canvas is very simple. As long as you understand the Canvas path + simple junior high school mathematics knowledge, you can complete it. Open CodePen and the analysis idea is as above. It is very simple. Calcula
The pop-up layer window is always centered. Copy the code as follows:<script type="text/javascript"> var isIE=window.XMLHttpRequest?false:true; var aIsIE={}; window.onlo
The code is as follows: Copy code code as follows: <script language="JavaScript"><!-- Beginvar today = new Date();var now = today.getDate();var year = today.
I found that I recently adjusted the format of the webpage and found that there is always a space of about 10 pixels at the bottom of the webpage. It is found that there is a Margin-BOTTON: 1EM that is set to set the entire FORM by using a chrome stray re