While statement:
CopyCodeThe Code is as follows: var I = 1;
While (I {
Document. Write (I );
I ++;
}
Do while statement:Copy codeThe Code is as follows: var I = 1;Do{Document. Write (I );I ++;
} While (I
In the above example, we will
We all know that JavaScript typeof can obtain the type of the variable, but typeof has only six return values: "number," "string," "Boolean," "object," "function, "and" undefined."
In fact, JavaScript still has many special categories, such as
Key value for letters and numbers)
Key code key code
A 65 J 74 s 83 1 49
B 66 K 75 t 84 2 50
C 67 L 76 U 85 3 51
D 68 M 77 V 86 4 52
E 69 n 78 W 87 5 53
F 70 o 79x88 6 54
G 71 P 80 y 89 7 55
H 72 Q 81 Z 90 8 56
I 73 R 82 0 48 9 57
Keycode
0.009.tofixed (2) should have returned the result of 0.01, But it returns a 0.00 error. This is a bug in this method, and this method has a high requirement on the JS version of the client, at least this method cannot be used in ie5.0, so I wrote
Another decryption process in Javascript, recommended, will basically solve this a lot
[General preparation]
1. First try to masterCode.
This requires some experience. The first step is to do what Hutia has done (although this step can be
Who is using these navigation?
Google is a big company with footprints on Google all over the world. Google animation in South Korea has a very good effect. Someone has dug up the blue ideal forum. Unfortunately, there are too many JS files, write
Latest animation tutorial + CD-zero basics Javascript
Good resources found on the Internet, CD and animation tutorials for the latest programming getting started book of the Mechanical Industry Press.
Donkey: http://board.verycd.com/t488833.html
Document. Cookie = "userid = 828 ";
To store multiple name/value pairs at a time, use semicolons (;) to separate them. For example:
Document. Cookie = "userid = 828; username = hulk ";
The names or values of cookies cannot contain semicolons (;),
The location object describes the addresses opened by a window object. To represent the address of the current window, you only need to use "location". To represent the address of a window, use ". Location ". Previously, I wrote window. Location.
Javascript Form Verification age
The javascript form verifies the age and determines whether an input value conforms to the age by using a regular expression.
// Check the age
Function isage (STR ){
VaR mydate = new date;
VaR now = mydate.
1.doc ument. formname. Item ("itemname ")
Description: In IE, you can use document. formname. item ("itemname") or document. formname. elements ["elementname"]; In Firefox, only document. formname. elements ["elementname"].Solution: Use
1. What is an anonymous function? There are three methods to define a function in javascript:
Function keyword statement:CopyCodeThe Code is as follows: function fnmethodname (x) {alert (x );}
Function literals ):Copy codeThe Code is as
Please refer to example2.html. The effect in firefox is not rounded up in ie because of compatibility.
DEMO code in pipeline.It is being modified.Please follow my blog for consultation on version upgrade informationHttp://auntion.blogbus.comOr add
In the use of cookies, we found a problem: If the content written into the Cookie is in Chinese (such as the user name), the server-side program (such as ASP or PHP) should read it completely correctly, however, a bunch of garbled characters are
Author:Abhijeet Bhattacharya, system software engineer, IBM IndiaKiran Shivarama Sundar (kisundar@in.ibm.com), system software engineer, IBM India
May 28, 2007
If you know the cause of Memory leakage, it is quite easy to prevent it in JavaScript. In
I like to start with the most basic content, and then go deeper. Experts may have to be patient.
First look at a simple application. In the following code, we need to implement a function, that is, click each button to display the corresponding
JavaScript has many tips to make programming easier. One of them is the eval () function, which can execute a string as a JavaScript expression. The following is its description
Eval function
Function: first explain the Javascript code and then
How to run code (JS only) in Z-Blog cannot display the "run code" link because FF does not support insertAdjacentElement. Today, I Googled and found a good article. I saved the following script into an iedom4moz. js file, and called -- OK on every
Recently I used the JavaScript event processing mechanism and found some information.
When I used to write JavaScript programs, all events used
Copy codeThe Code is as follows: object. event = handler;
. This method is common for Internet Explorer,
When I first started learning JavaScript, I was always confused by some inexplicable syntax forms in JavaScript. I don't know how many inexplicable syntax forms it supports? Now, through a few months of in-depth understanding, we have made them
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