There are two types of errors displayed on the page: the first is the default error message, which has been defined in the plug-in and can be manually modified.
The second is the error message specified by the parameter. If the parameter is not
In terms of flexibility, we have considered many aspects and provided several important configurations for ease of use in various environments. You are welcome to use shoes and the source code is fully open. The reason for developing this plug-in is
Today, I want to scroll down and zoom out the image. It seems very simple. I searched the internet and found the onmousewheel example. All of them only support the IE browser, the result shows that Firefox has the corresponding DOMMouseScroll to
In fact, the Default keyword is mentioned in the Function and Sub statements in the VBScript document of MSDN:
Copy codeThe Code is as follows: Default
Used only with the Public keyword in a Class block to indicate that the Function procedure is the
Copy codeThe Code is as follows: --- find the employee with the highest sales volume in the promotion activity
--- You have just found a job in a clothing sales company. At this time, the manager asks you to obtain the salesperson with the highest
To prevent Image Layout from being broken, the most common practice is to get the image size after onload and then adjust it. Therefore, it will still be broken during the loading process. The Qzone log image is improved here, and the original image
When we write a script, we create a cross reference, for example, the following code:
Copy codeThe Code is as follows: window. onload = function (){
Var x = document. getElementsByTagName ('h3 ');
For (var I = 0; I {
X [I]. onclick = openClose;
X [I]
In Javascript, I believe everyone has tried to use getElementsByTagName and childNodes to traverse nodes. However, getElementsByTagName is obviously inferior to childNodes for complex DOM structure traversal, because childNodes can better process
I didn't know where to download the source code a few years ago. I started learning jquery last year and changed it. The Code was a bit messy.
I just use it myself, but I didn't think about writing it as a general component. So it would be a little
For example:
Copy codeThe Code is as follows: $. get ('aaaaa. ashx', null, function (d ){
// Assume that the value returned by d is 1, 3, 54,67.
Var arr = d. split (',');
$. InArray (3, arr) =-1 // true
// Why?
// If you write
Var arr = eval ('[' +
A preliminary study and understanding of json2.js
1) The js is: http://www.json.org/json2.js
2) reference the script on the page:
3) Example 1:
Copy codeThe Code is as follows: // directly declare the json Data Structure
Var myJSONObject =
Two people answered the question while I was writing the example.
I tried it just now. Let's take a look at the example.
JS method:
Copy codeThe Code is as follows: press F5 to refresh the page .... string string string string string
Resizable adjustable size
Use $. fn. resizable. defaults to override defaults.
Usage
Copy codeThe Code is as follows:
Copy codeThe Code is as follows: $ ('# rr'). resizable ({MaxWidth: 800,MaxHeight: 600});
Features
Name
Type
The principle is simple:
Obtain the width and height of the current screen (form), because the size of the Form varies by browser. With this, the coordinates of the vertical center can be calculated. But why is the scroll bar still vertically
In fact, it is not difficult to implement it. First, let's look at the implementation process. First, if the navigation is within the display range, no modification is required. When the navigation is out of the display range, that is, when the
Copy codeThe Code is as follows:
Use marquee and div + js respectively to achieve the loop rolling effect of the first and end Links
Use marquee to achieve loop rolling effect (IE only):
here is the content to be rolled
Use DIV +
Here is a simple test page: "hello world" is displayed on IE and Firefox, while chrome, safari, and opera are unresponsive.
The following is a short test code (deliberately modifying domain so that the parent page and child page are different domain
1. Ignored local variables
Copy codeCode: var a = 5;
(Function (){
Alert ();
Var a = a ++;
Alert ();
})()
Alert ();
Think about the execution result of this Code.After the command is executed, check whether it is consistent with what you think?OK.
Typical code example
Copy codeThe Code is as follows: yepnope ({
Test: Modernizr. geolocation,
Yep: 'normal. js ',
Nope: ['polyfill. js', 'wrapper. js']
});
When Modernizr. geolocation is true, load the yep item, that is, "normal. js". Otherwise,
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