Mobile phone shake can be applied to a lot of scenes, such as shaking a lottery draw, shaking a wave search songs and so on. This article I will introduce you how to use Html5+php+jquery to achieve a mobile phone shake the effect of changing clothes.
Whether front-end development or background design, many times developers need to get information about the current or target URLs. This existing built-in object attribute can be invoked directly (here is the reference code to get the current page)
We do file upload, in order to achieve the effect of asynchronous uploads, will generally choose to use the form of IFrame to upload files, but we can not like Ajax to the server-side returned data processing, so as to file size and file style
The regular expressions in JS are a lot weaker than regular expressions in C #, but they're pretty much enough.1 Defining regular expressions2 about the validation of the three-this expression method3 escape characters for regular expressions1
Watch out for the damn IE multi-version problem.
Copy Code code as follows:
function Loadxml (xmlstring) {
var xmldoc = null;
if (!window. Domparser && windows. ActiveXObject) {
var xmldomversions = [' msxml.2.domdocument.6.0 ', ' msxml.
All know that in JS there is no way to directly implement the method overload, because in JS if the definition of multiple names are the same, but the number of parameters is not the same method, in fact, only the last method can be real call, the
A project was submitted last week (used internally), together with a bug, said to disable the BACKSPACE key (BACKSPACE or call Back button), because this and his habits are not the same, fearing that if the text input half, he pressed the backspace
Matter:1, found that the case is not enough to hover (to be resolved)2, unable to automatically paint the system randomly (pending resolution)First use the tag cloud for a high-profile site---photo sharing site Flickr. The designer of the tag cloud
The body of a regular expression.Special symbols are used in regular expressions. Below I will introduce the various symbols and their meanings and usages briefly (note: "X above includes X"):
/indicates that the following text is a special symbol.
The Ready () of jquery implements the Domcontentloaded event, the difference between domcontentloaded and the window Load event
Simply put, the ready () is triggered when the document is loaded, and the pictures and other resources may not be fully
Demand One: How does the main Page a pass the data to the IFRAME B?
In this way, the main page needs to pass the data to the IFRAME B, and then the IFRAME B gets the data for specific processing.
Implementation mode
The trick is to use the hash
Before you mention the above concepts, first of all, let's talk about the implied parameters of functions in javascript: arguments
Arguments
The object represents the function being executed and the arguments of the function that called it.
In JavaScript, you can use Try...catch for exception handling. For example:
Copy Code code as follows:
try {foo.bar ();} catch (E) {alert (e.name + ":" + E.message);}
At present, we may get the system anomaly mainly contains
The following is based on the ID number coding rules, using JS to validate the code
The Idcard-validate.js code is as follows:
Copy Code code as follows:
/**
* ID Card 15-bit coding rule: dddddd YYMMDD xx p
* DDDDDD: Area code
*
Example one:
These days have been plagued with a problem. Nodejs AES Encryption and java,c# encryption out of the inconsistency. Of course, this will not be decrypted. Tangled for a long time: Later or really die, looked at the source code, or else
In JavaScript, any legitimate function can be used as the constructor of an object, which includes both the system built-in functions and the user-defined functions. Once a function is executed as a constructor, its internal this property refers to
Example 1, which turns the number 1111111 to 11,111,111.00 and retains two decimal places.
Copy Code code as follows:
Run Online:
[Ctrl + A All SELECT Note: If the need to introduce external JS
The following is based on the ID number coding rules, using JS to validate the code
The Idcard-validate.js code is as follows:
Copy Code code as follows:
/**
* ID Card 15-bit coding rule: dddddd YYMMDD xx p
* DDDDDD: Area code
*
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service