JavaScript, which provides scripting languages, is very similar to C + +, except that it removes easily-generated errors such as pointers in C and provides a powerful class library. For people who already have C + + or C, learning the JavaScript
First look at the introduction in MSDN
Replace method
Returns the copy of a string that is replaced with text based on a regular expression.
Stringobj.replace (Rgexp, ReplaceText)
Parameters
Stringobj
Required option. The string object or
Write in the front: always want to systematically summarize the knowledge of JavaScript, like the language also love the language. In the future want to engage in front-end work, in advance to comb their knowledge. The knowledge of the DOM was
In the first two articles, we introduced the construction inheritance and the prototype inheritance. Now that we have finished writing the two remaining ones, these two applications are rarely applied to the first two, so I call them the
The first and second sections of this series introduce JavaScript module prototypes and theoretical concepts, and today we describe how they can be used in combat.
I'm using a very popular library require.js.
One, why should use Require.js?
At
The first part of this series describes how to "encapsulate" data and methods, and how to generate instances from a prototype object.
Today we are going to introduce five methods of "inheritance" between objects.
For example, there is now a
Method One: 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 is easier to
Passwords are an essential tool in our life and work, but an unsafe password may cause unnecessary loss. As a web designer, if we can make a security assessment of the password entered by the user in the Web page and display the corresponding
Front yard farmers in the project, there must be no small need to achieve the effect of the carousel. But there are special needs, such as:
You need to do the first container content after the carousel is scrolled, the second container is rolled
Game Introduction:
Spare time to write a flight shooting game, portrait, a total of six off.
Game Requirements:
1. The fighter can fire bullets, the bullets can be upgraded by acquiring props.
2. Fighter can put bomb, can get props to increase
Everyone has had the experience of using-min.js development, but such scripting debugging is a pain in the neck. If used as a compressed version of the line before going to compression, sourcemap the emergence of a perfect solution to this problem.
Adding your own label on the Douban is a common effect, and today it's a simple demo. Due to the problem of time I do not many principles, we can try to operate several times can understand the principle of it.
The effect of Jsfiddle is as follows:
In actual projects, we usually use constructors to create an object and then add some common methods to its prototype object. Finally either instantiate the object directly, or use it as the parent class, and then declare an object that inherits the
Flex will eventually generate the SWF file to deploy the Web page in an ActiveX manner (html,jsp,asp,aspx, etc.), because ActiveX is a standalone body it can not directly get the element data of the page, the same asp,aspx and other service-side
JavaScript is an object-based scripting language, and its input and output is done through objects. Where the input can be done through a Window object, and the output can be achieved by means of a Document object.
One, window and input and output
1. Basic Concepts
JavaScript is an object-based (object-based) language. This differs from Java in that Java is an object-oriented language. And based on the basic characteristics of the object is the use of event-driven (Event-driven). It is in
Class is one of the core concepts of object-oriented programming. A class represents the abstraction of a category of things with similar attributes. Starting with this article, we will formally enter the object-oriented part of JavaScript. The
1. The object
Object is one of the basic concepts of object-oriented programming, just look at the name and know it. In our familiar object-oriented language, such as Java or C + +, there are similar object definition methods. For example, we want
We used 5 articles to discuss how to write a JavaScript asynchronous invocation framework (problem & scenario, use case design, code implementation, chained invocation, chained implementations), and now is the time to take a look at how to use it in
The sort function method in JavaScript is to return an Array object that has been sorted by an element. How to use:
arrayobj.sort(sortfunction)
Where Arrayobj is a required option. Any Array object.
Sortfunction is optional. is the name of the
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