Copyright belongs to the author.Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.Song XueyanLinks: http://www.zhihu.com/question/19713563/answer/23068003Source: KnowShare a super-hairy
It is believed that every person with JS will often encounter the scenario of simplifying code with logical operators:evnt=evnt | | window.event, ..... var obj = unknownobj1&&unknownobj2&&unknownobj3;What are the principles of these logical
Random array sorting and JS shuffling Algorithm Based on js random shuffling Algorithm
Recommended reading:Add, delete, modify, and query the array of JavaScript learning notes
Array Summation Method for JavaScript learning notes
Random sorting of
Learn the front-end web sense and learn the web
Me and IT
Unconsciously, 20 spring, summer, autumn, and winter have passed, and I have also changed from a child to an adult! Over the past two decades, we have been sticking to the "cainiao" label.
Html, canvas, video grayscale, reversed color, canvas grayscale
:
Code:
canvas video color grayscale, reversed colors your browser does not support canvas!
Note: In this example, you need to run it on the server to see the
Simple introduction to json cross-origin and simple json cross-Origin
In this article, I have been listening to other people talking about json cross-origin, but I am confused. I only know one of them. So I am angry and read various materials. If
Rem explanation and usage, rem explanation and usage
It seems that I haven't written a blog for a while ...... Today, I just summarized the usage of rem.
First, let's talk about common sense,The default font height of the browser is 16 PX.. Step
JQuery implements the method of scrolling the mouse to zoom in and out the image (with demo source code download), jquerydemo
This document describes how to zoom in and out images by using jQuery. We will share this with you for your reference. The
The js date plug-in dateHelp obtains the date of this month, three months, and this year, and jsdatehelp
I have recently read some object-oriented knowledge. In my recent work, we need to use the date range of this month, the last three months, and
The basic method for merging arrays in JavaScript is described.
Here are two simple methods:First
var mergeTo = [4,5,6], mergeFrom = [7,8,9]; mergeTo = mergeTo.concat(mergeFrom); mergeTo; // is: [4, 5, 6, 7, 8, 9]
Or
var a = [1,2], b = [3,4], c
Deep understanding of JS prototype and prototype chain, and deep understanding of js prototype
PrototypeIt is a concept that is hard to understand in JavaScript. There are also many prototype-related attributes, the object has the prototype
Programmers who do not understand the front-end are not good artists-use the UI framework metronic tutorial-programmer perspective, uimetronic
In the opinion that programmers who do not understand the front-end are not good artists, as a programmer
Use Promise to encapsulate FileReader and promisefilereader in javascript
Promise is a good choice when processing Asynchronization. It can reduce the nested hierarchy and make the Code better read and the logic clearer. ES6 adds it to the
Separate each three numbers with a comma in Javascript, and separate the js amount with three commas.
Frequently Used in work:Example 1: change the number 1111111 to 11,111,111.00 and retain two decimal places.
Example 2: Convert the number 1
Introduction to $ http service usage in AngularJS, Introduction to angularjs
We can use the built-in $ http service to directly communicate with the outside. $ Http service simply encapsulates the native XMLHttpRequest object of the browser.
1.
JavaScript is used to obtain the prev and next methods of an element adjacent to a sibling node.
This example describes how to use JavaScript to obtain the prev and next methods of an element's adjacent sibling nodes. We will share this with you
Based on JS, the news list can seamlessly scroll up the instance code and js News list
When there are a lot of news and there is no limit at all, using scroll is a good choice. This chapter describes how to achieve this through code examples.
The
Complete jquery drag-and-drop effect example (with demo source code download), jquerydemo
This document describes the drag and drop effects implemented by jquery. We will share this with you for your reference. The details are as follows:
The
Javascript automatically restored text box click the default text after clearing, javascript text box
This article introduces the js instance code for clicking the text box to clear the default text and then restore it. The details are as
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.