The following code encapsulation is common and easy to understand. Only by first understanding this can we gain a deeper understanding of the json format-oriented and definition methods. JavaScript Information Encapsulation
Before coding, we need to
Review the use of arrays in JS. For details about how to learn js arrays, refer.
Truncated array: slice (startIndex, endIndex ):Returns the array with the specified start position and end position. Does not change the content of the original
Jqzoom is a jquery-based extension for magnifiers. It is compatible with multiple browsers and can be tested by anyone you like. The following is the complete code for jqzoom packaging.
The Code is as follows:
JQzoom Demo
Js refresh framework PAGE method. Sometimes you need to control the page content refresh in the framework. The following methods are detailed. For more information, see. Let's look at a simple example:
The following example uses the three pages
You need to refer to some code on the Internet to create an image capturing tool, and finally encapsulate it into a jquery plug-in. In addition to jquery, this plug-in also references the UI library, including ui. draggable. js.
The ImageCropper
Jquery selector is the most basic operation. When we use native javascript, we have to spend nine heads and two tigers to choose an object. With Jquery selector, the food is delicious, good health ......
1. Basic
We know that jquery is the most
Extjs dynamically loads the implementation code of the tree. For more information, see. Extjs dynamically loads the tree. First, design the table for storing the tree information in the database.
The Code is as follows:
USE [KimiExtjs]GO/*****
Disabling js file caching is a major problem I have encountered all the time. I finally found a better solution:
1. Add the following to the place where you reference the JS file:
The Code is as follows:
// Modified on January 1, August 14Var now
JQuery is so popular, and a variety of jQuery plug-ins are also full of sky. Have you ever thought about writing some of your common JS functions into jQuery plug-ins? If your answer is yes, come on! Learn to write the jQuery plug-in with me! Many
Sharp jQuery key points (1) jQuery selector. For more information about jquery learning, see.
1. Basic Selector
$ (# Id)
Matches an element based on the given id.
$ (. Class)
Matches the element based on the given class name.
$ (Element)
Match
This is a control that allows DOM elements to be dragged. The code is very simple. I am a newbie. I don't know if there are any bugs. I can test it myself. I hope you will find bugs and raise them enthusiastically. Thank you. This is based on JQUERY,
The JqueryAjax learning instance sends a request to the page and returns the code of XML format data.
I. AjaxSample. aspx
Process business data and generate XML data for JqueryRequest. aspx to call. The Code is as follows:
The Code is as follows:
This function has always been used in firefox. I have studied it carefully today and corrected it. I hope that other people will not encounter such problems.
The Code is as follows:
Function cleanWhitespace (element ){// Process the entire HTML
Round is rounded in... Ceiling is rounded up .. Float is a number of methods to round down a small value to an integer: Math. ceil (), Math. floor (), and Math. round (). The three methods follow the following rounding rules:
◎ Math. ceil () rounds
This menu has been removed from Baidu's promotion. The CSS file is removed, and only the core Js actions are retained. Click the title of each item to expand the level-2 subitem menu, if you want to add styles by yourself, you can better match the
The Hungarian naming method was invented by a Microsoft programmer. Most C and C ++ programs use this method. JavaScript variable Hungary name Method
Syntax of the Hungarian name method:
Variable name = type + Object Description
Type refers to the
In this chapter, I will give an overview of important events, including compatibility issues with some popular browsers. The events proposed here, when they happen on a fixed HTML element, their names can be recognized by most browsers. That is to
Although the version is very old and does not conform to the standard, the code is worth reference. If you need a right-click menu, you can refer to it. Although the version is very old and does not conform to the standard, the code is worth
Cross-origin and JSONP of AJAX (another function to automatically add a short address for the article) What is AJAX cross-origin request
For the sake of security, if you want to request the content of another website www. B .com via Ajax from
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