Browse jquery's deprecated list and discover that live () and die () are inside, and look at it, and find out from jQuery1.7, jquery introduces a completely new event binding mechanism, on () and off () two functions to handle event bindings
The main methods are as follows:
Copy Code code as follows:
. Data (key, value)
. Data (obj)
. Data (Key)
. Data ()
From jquery 1.4.3, the HTML 5 data-attribute is automatically referenced to the data object in jquery.
For
Development of a file upload share site, once wanted to use the following code to achieve file upload function:
Copy Code code as follows:
fill out of the form to upload a file:
for ($i = 0; $i Echo ' File:
Description:
';
This is the cookie I just started setting up.
Copy Code code as follows:
Setcookie ("Qq_access_token", $_session[' Access_token '],time () +3600*24*90);
Found on the other page can not use, and then go to the cookie inside to see what
Code Demo:
Http://www.imqing.com/demo/movediv.html
Approximate principle:
Make div position Absolute positioning Absolute, then control its top and left values, need to monitor mouse events, mainly to MouseDown, MouseMove, MouseUp.
After the
1, first to the jquery website to download JS Library, URL for http://jquery.com/
2, build a jquery sample project.
3, put the JS library into the jquery sample project.
4. Write an HTML page
Copy Code code as follows:
Directly on the code, the length of the substring can be set itself (for example, 4 consecutive characters or 5 characters).
Copy Code code as follows:
$str = ' I am a Chinese I am a foreigner I am a Korean I am an American I am a Chinese
First code:
Copy Code code as follows:
jquery Namespaces
The effect as shown, I double-click the same time, will first trigger two click events, what is this? Also, if I don't want to trigger when I
They are powerful, but sometimes they do not outweigh the gains. If you're using jquery, there's a built-in way to load a single JS file. You can use this method when you need to delay loading some JS plug-ins or other types of files. Here is a
jquery and JS initialize the difference in loading pages:
jquery: Waiting for the page to finish loading data, and part of the page elements (excluding pictures, videos),
JS: Is the page full load complete before performing initialization loading.
1, jquery capture Enter:
Copy Code code as follows:
$ ("html"). Die (). Live ("KeyDown", function (event) {
if (event.keycode==13) {
Add the logic to be processed here
}
});
Bind carriage Return action
$ ('
Jquery.map (Array, callback (Elementofarray, Indexinarray))
Returns:array
It feels like jquery's Map method works very well and is shared with you.
Method action: Replaces an array or a single object with the new content.
Application Example:
A few days ago installed the DEDECMS system, when the safe exit in the background, the background appears blank, previously only to analyze other functions to go, also did not pay attention to security, looked at the safe exit code, is written in
1. Open the Apache httpd.conf file and find# Virtual Hosts
#Include conf/extra/httpd-vhosts.conf
This section removes the "#" in front of the include conf/extra/httpd-vhosts.conf.
2. Modify the Hosts file located in the (Win7) c:/windows/system32/
First, close the default_charset in the PHP configuration file php.ini:1. The page does not specify CharSet, Apache configuration Defaultcharst GBK, paging file encoding is Utf-8Results: garbled, using Wireshark grab packet, found the header
A string similar to the following (GBK), explode does not get the correct result:
1. $result = Explode ("|", "Tenghua Town | 海青"); The reason for this, for "town" word (read Tao, do not know that it does not matter, I do not know), because his GBK
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