Click () object. Click () enables the object to be clicked.
Whether the closed object window has been closed; true/false
Cleartimeout (object) clears the set setTimeout object
Clearinterval (object) clears the set setinterval object
The confirm (
Note: After the variables are declared, they are released only after the browser is closed. They can be used at any time before they are closed.Function circle (RADIUS ){
// R is an instance property, defined and initialized in the constructor
VaR values = new array ();Values ["No1"] = "Beijing ";Values ["NO2"] = "Tianjin ";Values ["NO3"] = "Shanghai ";Values ["No4"] = "Guangzhou ";Alert ("values =" + values );
// The for loop below cannot be entered, because the array subscript is a
The Code is as follows, but also add jmail. dll and register it, you can go to the http://www.fly263.com/Soft/ShowSoft.asp? Softid = 4 download one.
You can also find it in your own resources. After downloading it, there will be an install.
One type:
Function _ length (STR ){
VaR Len = 0;
For (VAR I = 0; I If (Str. charat (I)> '~ ') {Len + = 2;} else {Len ++ ;}
}
Return Len;
}
Two types:String. Prototype. gblen = function (){VaR Len = 0;For (VAR I = 0; I If (this. charcodeat (I)> 127 |
Javascript Exception Handling (try... catch... finally)
The following information is from "ntsky's blog"P.s.I recently started to study Ajax technology, which uses JavaScript error capture! I found this article well written on the Internet and added
VBScript
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
Javascript
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
Usage: copy the full source code, and the example is a. html file.
Disclaimer: This program is a work exercise by the author. The result is not guaranteed to be 100% correct. You are not liable for any losses caused by the use of this program.
Recently, JavaScript's cross-origin and compatibility problems have been overwhelmed, so I took the time to review the Javascript basics. Here I will talk about some of my opinions on the Javascript operating mechanism.
Javascript is different from
Whether the number type is allowed to be null is indeed a headache.
The goal of parallet is the scripting language (but it can also pre-compile the Code)
All types of many scripting languages are allowed to be null.
However, to make the number null,
// Specified red by base2 and prototype
(Function (){
VaR initializing = false, fntest =/XYZ/. Test (function () {xyz ;})? /\ B _super \ B /:/.*/;
// The base class implementation (does nothing)
This. Class = function (){};
// Create a new class
} JSON (JavaScript Object Notation) is a lightweight data exchange format that is easy to read and write, and easy to parse and generate by machines. It is based on JavaScript. JSON uses a completely language-independent text format, but it also
When you are not sure about the variable type, do not use it to determine whether the Javascript variable is null:
If (TMP ){}
The problem with the above judgment is that, for example, when the TMP value is 0, false is also returned.
So try to
In the afternoon, I want to create a Javascript script that follows the mouse. I found that browser compatibility is really annoying, and there is also a problem with the position of the scroll bar.
Fortunately, everything is available on the
In addition to boring questions, questions, and occasional examples, relax. some time ago, I also played with the Google engine app (hereinafter referred to as GEA). Previously, I deployed Python and Java applications in turn, but I didn't really do
I. usage of this
1. Use this in HTML event attributes
For example:
2. Use this in the event processing function
Example: button2.onclick = function (){Alert (this. Name );}
3. If this is used in a global function, this is a window object.
Example:
I didn't expect JavaScript to be able to simulate interfaces, So I suddenly thought JavaScript was more powerful. So I extracted the content of JavaScript Design Pattern for everyone to learn. The content was slightly changed.
1. Benefits of
Make a joke before writing an article to make the atmosphere more lively --
Principal: "Sir, I have good news. A bad news is about your son ." Parent: "Principal, let's talk about bad news first !"
Principal: "The bad news is that your son is very
The window object is the top-level object in the Javascript browser object model. It contains multiple common methods and attributes:
1. open a new window
Window. Open (pageurl, name, parameters)
Where:
Pageurl is the sub-window path
Name is the sub-
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