"Program Source"
Copy Code code as follows:
var QQ = function () {
Common functions
function t$ (ID) {return document.getElementById (ID);}
function t$$ (root, Tag) {return (Root | | document). getElementsByTagName (tag);
function
Function and object are examples of functions
The parent prototype of a function points to the prototype of the function, and the parent of the prototype of the function is the prototype of object.
The parent prototype of object also points to the
1, call
Call method
Invokes one of the object's methods to replace the current object with another object.
Call ([thisobj[,arg1[, arg2[, [,. argn]]]]
Parameters
Thisobj
Options available. The object that will be used as the current object.
Arg1,
The correct source program is as follows:
Copy Code code as follows:
I defined the var Btnreg = document.getElementById ("Btnreg") of line fourth as a global variable Btnreg = document.getElementById ("Btnreg");
And put it beyond the
Gets a list of control IDs in a container control that contain a string ID
Parameters: container control, ID keyword for the control to find, label name of the control to find
Return value: The list string of control IDs found to be separated by
Here's a personal view of how parallel operations will support front-end JavaScript.
1 An unlikely evolutionShow support for Threads
If the display thread is supported in JavaScript, it could be a disaster, and the current browser parsing
Self-executing function: A function that is executed automatically. It is already running when it is interpreted. General functions are executed only when invoked.
General format of the self-executing function: (function () {Functional Body})
In my previous blog post I introduced a way to give JavaScript a bit of programming power like a lambda expression, but because it was compatible with JavaScript syntax checking, there was a limited number of places to use.
But some of the more
Tip.js
Copy Code code as follows:
function Tips (obj,tag) {
var tip = document.createelement (' div '), arg= arguments[2],left,top; Create Tipbox
var bodywid= document.documentElement.clientWidth; This can also be replaced with the
1. Converting numbers to strings, applying "+ 1", although it looks uglier, is actually the highest efficiency, and performance says: ("+) > String () >. toString () > New String (), try to use the inner Operations are faster than the user actions
1: Move the layer to get the point of the x-axis y coordinate, so that absolute positioning (note: The vertical pull box affects the x-axis y coordinate values)
Copy Code code as follows:
var x,y,z,down=false,obj
function init () {
Today I met this problem:
Copy Code code as follows:
Pseudo code
for (var i=0; iAddevent (Obj[i], "click", Func (i));
}
As a result of the problem, all the DOM is registered in the i=n of the event, looked up some information, said
Big Small font display small Beijing-Tibet high-speed unobstructed four days later again traffic jam hundreds of kilometers Yesterday 8 o'clock in the morning, CCTV reporter along Ordos lasted 3 hours, only travel more than 120 kilometers, to
var list = [{id:1, Name: "Czone", age:21}, {id:2, Name: ' Czonechan ', age:21}];
var template = ' $name $age ';
Implement a common method that uses initialization data to assemble the stencil.
Copy Code code as follows:
function
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