JavaScript Split method
The split method is used to split a string into an array of strings and return the array. The syntax is as follows:
Copy Code code as follows:
Str_object.split (separator, limit)
Parameter
Http://www.cnblogs.com/TomXu/archive/2012/02/16/2351331.html, you will have a deeper understanding when you come back and read this article. Because I am here to introduce the concept of things less, look at the following example, the novice friend
The usual array is populated with an implicit or display of the specified array subscript, but the array in JS can be assigned the element in the form of a name, which forms an associative array, such as:
Copy Code code as follows:
First, introduce the next 5 kinds of original types
5 of the original types in JavaScript are string, Number,boolean,undefined,null
var name = "Jack";
var age =;
var single = false;
var app; Undefined
Console.log (typeof name);
Front.
The underlying syntax for JavaScript's regular expressions is described earlier. The RegExp class of JavaScript represents regular expressions, and both string and RegExp define methods, and regular expressions allow for powerful pattern
Summary
A private variable is declared within an object using the ' var ' keyword, and it can only be accessed by private functions and privileged methods.
Private functions are declared in the object's constructor (or by the Var
JavaScript seamlessly scroll up and down Gao Dingkuan Pause effect (compatible IE/FF)
javascript seamless up and down rolling Gao Dingkuan pause effect (compatible ie/ff) var $ = function (ID) {return "string" = = typeof ID?
1. There is no outerHTML method in Outerhtml,ff compatible with Firefox.
Copy Code code as follows:
if (window. HtmlElement) {
htmlelement.prototype.__definesetter__ ("outerHTML", function (SHTML) {
var r=this.ownerdocument.createrange
Because the vast majority of browsers are compatible with it, you can use it in these browsers. JavaScript is accepted fairly quickly because it is so simple and has a fairly wide range of uses. Many programmers used to think of JavaScript as a "toy
1, the original code, the inverse code, the complement, the positive subtraction to complement addition
JS in the binary operation, the use of 32-bit binary integer, because the whole number of JS is signed, the highest bit 0 for positive numbers, 1
Using jquery to get URLs and using jquery to get URL parameters is an operation we often use
1, jquery get URL is very simple, the code is as follows
Copy Code code as follows:
Window.location.href;
Actually just use
Date Object
1. What is a Date object?
Date objects can store any one date, and can be accurate to milliseconds (1/1000 seconds).
Syntax: var udate=new Date ();
Note: The initial value is the current time (current computer system time).
2.Date
If you simply convert the current time to a timestamp, you can use the new date (). GetTime ()/1000, but if you turn a specific time or date into a Unix timestamp, IE does not support a method with parameters like new date ("2013-1-1") and returns
JavaScript from definition to execution, JS engine in the implementation layer do a lot of initialization work, so before learning the JS engine working mechanism, we need to introduce a number of related concepts: Execution environment stack,
In this paper, we share a tab function which can realize automatic switching, and give the realization process of it.
About the tab we will not be unfamiliar, the application is very frequent, usually the tabs are required to click or across to
The examples in this article describe how JavaScript obtains current CPU usage. Share to everyone for your reference, specific as follows:
To get the current system CPU usage, if you allow an HTA, you can use the following code to get the current
What is closure
What is a closure? Closures are closure, a new feature that static languages do not have. But closures are not something that is too complex to be understood, in short, closures are:
Closures are the set of local variables of a
One, JavaScript asynchronous programming two core difficulties
asynchronous I/O, event driven enables single-threaded JavaScript to perform network, file access without blocking the UI, and enables higher performance on the back end. However, there
Although JavaScript history uses a long, annoying block of code to mark the end of a particular browser, it is still necessary to occasionally use simple blocks of code and object detection to ensure that some code is working properly on the user's
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