If your website uses some mainstream Ajax libraries such as jquery or prototype, you can directly use Google javascript API loader to load your Ajax library.
The specific method is as follows:
Because Google uses CDN to send data to the client,
/*
* (Refer to p151)
* @ Time 2008-11-25
*/
CopyCodeThe Code is as follows: // No Return Value
Function test0 (){
This. Name = 'test0 ';
}
VaR test0 = new test0;
// Debugger;
Alert (test0); // output [object]
Alert (test0.name); //
I wrote it like this:
Function Foo (x ){
If (arguments [1]) {
// Do something ..
} Else {
// Do other ..
}
}
However, no matter how many parameters are passed in, the IF (arguments [1]) step is skipped. When I was about to go crazy, I
Direction keys supported
When radio is selected as the last one, it automatically jumps back to the first one after pressing the keypad.
Checked can automatically trigger onclick
Supports various browsers and cross-browser
powerful radio
Replace () is a simple replacement of characters. Example
Code As follows:
I think you can see the result after running it. It only replaces the first letter. However, if you add a regular expression, the results will be different! Oh, that's
CopyCode The Code is as follows: // initializes a new instance of the stringbuilder class
// And appends the given value if supplied
Function stringbuilder (value)
{
This. Strings = new array ("");
This. append (value );
}
// Appends the given value
Loop is a commonly used control structure. Most things are completed by it. In JavaScript, we can use for (;), while (), for (in) in fact, the efficiency of for (in) in these three loops is very poor, because it needs to query hash keys, as long as
Ii. Enhanced navigation
1. Link (links in select menu) in the drop-down menu)
Q: How can I link to different pages in the drop-down menu?
A: Create a drop-down menu as shown in the following figure:Select a pageJavascript
Simplified Plugin:
Simpleplugin.htm:
CopyCode The Code is as follows:
simplified plug-in
Jquery. simpleplugin. JS:
Copy code The Code is as follows: $. FN. Dialog = function (){
This. maskdiv = function () // customize a function
{
/
HTML file:
CopyCode The Code is as follows:
add, delete, modify, and query JS operations in XML (under IE)
XML file: copy Code the code is as follows:
tree
male
Compressed JavaScript has been found beforeCodeOfProgram, Has been in use, I feel the effect is good.Http://javascriptcompressor.com/Online JavaScript source code CompressionOnly remove spaces, line breaks, unnecessary comments, etc. Especially when
The following are several methods that have been used by the home of scripts.
CopyCode The Code is as follows:
Below are the regular functionsUse JavaScript regular expressions to parse URL linksHttp://www.jb51.net/article/15000.htm
The
However, after a small effort, I finally touched the door and solved the problem.
Then, a formula is written, which should disappear. formula:
1. Starting from 1 to any value
Linenum
Parseint (math. Random () * Upper Limit + 1 );
2. From any value
In fact, this problem is closely related to the browser version. As a rookie, I still have not found a perfect solution. No way, because the business must be implemented, so we have to do it in another way:
By redirecting URLs, you can "close" the
Window objects in Javascript It is the largest object in JavaScript and describes a browser window. Generally, to reference its attributes and methods, you do not need to use the "window. XXX" format, but directly use "XXX ". A framework page is
This is an important concept in object-oriented language. In large languages such as JAVA and C #, this is fixed to the current object at runtime. However, in javascript, due to the dynamic nature of javascript (interpretation and execution, there
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