javascript: Stacks
A list is the most natural way to organize data. A stack is a data structure similar to a list that can be used to solve many problems in the computer world. Stacks are an efficient data structure because the data can only be
Objects in JavaScript are composed of two basic elements of a property and method. The former is an object that implements the loading unit of the information in the process of carrying out its required behavior, which is associated with the
1 createelement (Element)Creates a new element node with the specified label name, and the return value is a reference pointer to the new element node.EG) var para = document.createelement ("P");Document.body.appendChild (para);
2 createTextNode
Basic Knowledge Review:
Dom is the Document Object model, the DOM is actually processing HTML as an XML file, looking at the HTML with the object's eye, which can be said to be the most useful invention of the web after HTML.
Some Review of XML
New
var re = new RegExp (' Test ', ' GI ');var re =/test/gi;
functionTest ();//boolexec ();//string match once and returnMatch ();//array multiple matches and returnsSearch ();//similar to indexof ()replace ();//replacementSplit ();//Split
Useful
Let your website advertising no longer affect your site speed: First load the page after loading the advertising method, first load the page, after the loading of ads, advertising finally display, so as to ensure that the Web page of the normal
In fact, I've listed all the "null" and "false" values in JavaScript, except that the Boolean value itself is true and false, "null values" for other data types are mainly undefined and defined. The types of these null values are:
The
Log functionality is needed in recently developed software, and one of the important features is the display of dates and times. So a search on the Internet, search to a large number of date format functions, but compared to the next, the sense of
Method One:
Personally think the best way. Using regular expressions, this is the core principle.Second, this method uses the prototype properties of JavaScript
In fact, you do not use this property can be implemented using the function. But this
See a lot of people have this reserved number of decimal point after the demand, but most of them write a function to intercept, but also consider rounding up what, it is quite complicated to write.
In fact, the number object of JavaScript has a
JSON syntaxJSON is constructed in two structures:Object-A collection of name/value pairs. In different languages, it is understood as objects, records, structures, dictionaries, hash tables, a list of keys (keyed list), or associative arrays. An
URL is: Uniform Resource Locator (uniform Resource Locator, URL)The complete URL is composed of these parts:Scheme://host:port/path?query#fragmentScheme: Communication protocolCommonly used Http,ftp,maito, etc.
Http://localhost/test/test.htm?id=1
Example of splitting a string using the Split function in javascript:
The code is as follows
Copy Code
Here is a specific description of the function: Split method
Splits a string into a substring and
1. Implement classes with JavaScript
JAVASCRITPT does not have a dedicated mechanism to implement classes, here is the use of its functions to allow nested mechanisms to implement the class. A function can contain variables, and can contain other
Because most of the project JAVASCRIPT,CSS client work is another colleague in charge, the colleague and special busy can not be reconstructed, the boss also just make suggestions did not immediately implement refactoring. But I've also changed a
Look at a piece of code first1 2 3 4 5 document 6 7 8 9 21 22 This code shows a bit of the difference between A for loop traversal array and a for-in loop through an array: The standard for-loop i is the number type, which
Vue data-driven Simulation Implementation 4. vue Data Simulation
I. Preface
In "Data Driven by simulation Vue 3", we have extended a $ set method for each object to add attributes, so that we can listen to new attributes.
Of course, arrays are also
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