Because variable B stores the reference of the function, when the function changes, B also changes at any time, regardless of the order in which the function appears. Two times of alert (B), although the location is different, but the content is the
Implement a common method and use initialization data to assemble templates. For more information, see. Var list = [{id: 1, name: "czone", age: 21}, {id: 2, name: 'czonechan ', age: 21}];
Var template ='
$ Name $ age';
Implement a common method
Some time ago, the project needed to use the js tree. After finding many of them did not meet the project requirements, I found the plum blossom Snow tree and js framework. The usage similar to the C # namespace made me shine, after reading the code
The movement of layers is simple, and it is not difficult to write one by yourself using jquery plug-in. However, in a recent ipad project, it is difficult to move the div by hand, poor experience (probably because the ipad configuration cannot be
Write a function to Convert RGB values to achieve the following effects. Example: # 1234ff output # 1234ff
#123 output #123
#12345g output #12345g
The Code is as follows:
Function RGB (rgb){Reg =/^ # ([a-fA-F0-9] {2}) ([a-fA-F0-9] {2}) ([a-
Replace the placeholders in the string based on the provided Json object. For more information, see. For example:
String containing placeholders hello, {name}, your birthday is {birthday };
Provided Json object {name: "czonechan", birthday: "1989
After the expression is added with the parameter g, it indicates that global matching can be performed. Note the meaning here. Detailed description:
1) if g is not added to the exec method of the expression object, only the first match is returned,
The first custom jQueryUIWidget is the first time. Now we feel that jQueryUIWidget can make your code better organized and have a more consistent style.
How to get startedFirst use $. the widget () method begins to define your component. It only
The easyui-Dialog plug-in implementation code is encapsulated for reference.
The Code is as follows:
$. Fn. hDialog = function (options ){Var defaults = {Width: 300,Height: 200,Title: 'Here title ',Html :'',IconCls :'',Submit: function () {alert (
CSS and JS label style Attribute Table (friends who are convenient for js Development). You can add them to your favorites.
Comparison between box labels and attributes
CSS syntax (Case Insensitive)
JavaScript syntax (case
The code below is a number of functions that often need to be verified for some forms for your convenience.
The Code is as follows:
/// ---------------- Author Teng -------------// Verify whether it is nullFunction check_blank (obj, obj_name ){If
If you see the effect of A tag title on other websites, you can use it on your website. Just learning jquery plug-in extension, I started to write an IE effect by referring to the previous code.
Firefox or other browsers
Code
The Code is as
Cnblogs garden hasn't provided this function yet, and we have to write one by ourselves. If you need it, you can refer to it.
The Code is as follows:
Var unlikes = ['zhang523012313 ', 'yangtonggnet'];Function delUnlike (filter, expr ){$ (Filter).
For more information about the use of firefox's ElementTraversal interface, see.
FirstElementChildThis attribute of Element 1 must be referenced by the first subnode of the nodeType 1 Element as an Element object. If the accessed element attribute
Javascript learning notes, some simple tips, you can read javascript learning notes.
1. onchange and its onpropertychange, oninputIn IE, you can use onpropertychangel to immediately trigger the listener,
Oninput can be used in FF, but events must
Internet Explorer 6 has been disgusting for a long time. Google's Youtube decided to stop its support for Internet Explorer 6 since March 13, hoping to accelerate the speed of Internet Explorer 6 replacement. However, most users in China are still
The following code can run normally only when the security level of IE is low. It is posted for reference by friends who can learn this technology.
The Code is as follows:
ScriptFunction readThis (){Var tempStr = "";Var filePath = document. all.
I want to use JS to encrypt and decrypt texts, and I want to use the Virginia cryptographic algorithm. Who has the ready-made code?
The Code is as follows:
Var Vigenere = {_ StrCpr: 'abcdefghijklmnopqrstuvwxyz _ 12345 67890.
Press ENTER Based on Jquery to generate the code for focusing the switch effect (EnterToTab). For more information, see. Method 1:
The Code is as follows:
$ (Document). ready (function (){$ (': Input: text: first'). focus ();$ (': Input: enabled')
During this time, the project has been completed and the idle time is large. Started the ExtJs learning journey. After reading books for a few days, I checked the API. I can't remember much in my mind, so it's better to learn from it. Try to start
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