The preparation of this game is much more difficult than before. This time I usedInheritance of JSAndFactory mode of Design ModeIs also a breakthrough...
The general design concept of the game:1. Player: A person can move around or up or
How to load the page before loading the advertisement:
The order in which a webpage is opened is loaded in the order from top to bottom. Therefore, to make the advertisement do not affect the page opening speed, you must wait until all the pages
Take a look:
The opportunity is rare, and there are some technical highlights, So I suddenly invested in function development. In the development of this feature, I still learned some good things, one of which is, how do I preview the uploaded
CopyCode The Code is as follows :/**
* Format a number
* Author: Z, mingyu
* Parameters:
* Prmnum (number): number to be formatted
* Prmptn (string): formatting rule, for example, #,## 0.00
** Prmnullvalue: The result returned when the number to be
However, I have to deal with a very loose HTML page that cannot be XML
Therefore, the focus of this article is that if the webpage to be obtained contains Table or List sections, you need to save the section information to the JS array as a
The long-term value of software is directly derived from its coding quality. Throughout its lifecycle, a program may be read or modified by many people. If a program clearly shows its structure and features, it will reduce the possibility of errors
Copy codeThe Code is as follows: // initialize the navigation background, iframe container
Function fnDaoHangBg ()
{
Var h = fnGetHeight (), w = fnGetWidth (); // obtain the background window size.
If (! $ ('Divdaohangbg '))
{
Var div = $ C ('div ');
Copy codeThe Code is as follows: function tt ()
{
Alert (11 );
}
Var B = tt;
Var b1 = tt (); // execute the tt () function
For function reference, you can directly assign the function name "tt" to the variable, but it cannot be in the form of
My summary of the Array object is: Method 5, method 3, Method 12
1. Method 5 of declaration: only for one-dimensional arrays, of course, there are two-dimensional 3D. I will not explain it here.Copy codeThe Code is as follows: var a = new Array
As we all know, binding without parameters is very simple, as long as you use (Syntax: "document. getElementById ("Object ID name "). attachEvent ("event name, such as onchange", function name); ") (example:" document. getElementById ("select_0 ").
I. Method of type conversion and precautions:
1.
Convert to boolean:
(1) Use two non-operations (!) :
!! 5 ==> true
(2) Use a Boolean constructor:
New Boolean (5) ==> true
Convert the value to a Boolean value of the false type:
0, + 0,-0, NaN, ""
Detailed description:
1) if g is not added to the exec method of the expression object, only the first match is returned, regardless of the number of executions. If g is added, then, the first match is returned for the first execution, and the
1. Use DocumentFragment
There was a plane-hitting game. I used the following method to add a bullet:
Copy codeThe Code is as follows: for (var I = 0; I Var bullet = new Bullet ();
Document. body. appendChild (bullet );
}
The problem arises. My goal
Not to mention nonsense. Let's look at the code first.
Copy codeThe Code is as follows:
Yiyi garden
The above code 1 should be run in Firefox and IE respectively. In Firefox, [object Text] appears, while in IE, [object]
However, the author, Nicolas C. Zakas, did not go into the possible problems and solutions when creating objects in the [Dynamic Prototype] mode. The bottleneck of the dynamic prototype is described only during inheritance. That is, when the
Let's take a look at this example:
Copy codeThe Code is as follows: var a = 'global ';
(Function (){
Alert ();
Var a = 'local ';
})();
At first glance, what is the output result of this example? 'Global '? Or 'local '? In fact, none of them. The
That is, the effect of image switching is customizable. Through this component, we can customize a lot of effects, but this is not final yet. Now let's try it first.
Copy codeCode: var pola = new PhotoLook ("contain"); // create a PhotoLook
1. AIE (Demo address)
AIE is an open-source ajax image editor developed based on ExtJS and PHP ImageMagick. It is easy to integrate with other applications such as blogs and albums. Provides functions such as adjusting the image size, cropping the
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