Ecmascript Introduction
Ecmascript isEuropean Computer Manufacturers Association(ECMA) Scripts standardized through ECMAScript-262ProgramDesign Language.
1998, International Standardization Organization and International Electrotechnical
Processing cookies in Javascript is complicated. Therefore, we always create our own cookie processing method.
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> // This setcookie ()
The problem scenario is as follows:
On the.html page, the onsubmit event of calls a method Foo () to open the B .html page and PASS Parameters to B .html. In method Foo (), you need to pass the variable parameters to the B .html page, and
VaR Point = Function (X, y ){ This . X = X; This . Y = Y;}Point. Name = ' I am name ' ;Point. Prototype. Sum = Function (){ Return This . X + This . Y;}Point. Prototype. Odd = Function (){Alert ( This .
Javascript retrieves address bar Parameters
// Paramname is the parameter name
Function getaddressparamvalue (paramname)
{
VaR paramtext = Window. Location. search;
Paramtext = paramtext. substring (1, paramtext. Length );
VaR paramarray =
Generally, if we define a class, we define a function object and write the public method to its prototype. For example:VaR tiger = function (){}Tiger. Prototype. Hunting = function (){}
However, to build a complete framework or class library,
Question: Do not read this article if you are under 18 years old.
Javascript is a fully object-oriented language, so its attributes are all objects.
What's more, the JavaScript Object is transformers, which can be changed at will.
You can
I suddenly felt that the current JavaScript library design is more or less inconvenient.
Especially when using an object for config.
For exampleCodeWe should be quite familiar:
1$. Ajax ({
2 URL: '/books/123 ',
3 Type: 'get ',
4
Er, this time we mention jquery.
We know that jquery is a good guy in JavaScript.
Many people even started learning JavaScript For jquery.
For example, undefined.
=. =
Then a colleague encountered a problem when using jquery.
Er,
[Statement: The following is a note, not original]
As we all know, a function variable can be defined directly using a function in Javascript, for example:VaR myfunc = function (x ){Return "hello," + x + "! ";};If you want to define a recursive
Let's start with an example.
VaR Sound = 'roar' ; Function Myornerybeast (){ This . Style. Color = 'green '; // Object To which the window method is called Alert (sound );} // This environment can change as the function is assigned to
Since it is a teaching material, we should also have a template example or something.
Okay.
Here is an example of JavaScript.
How to write the most strange and best possible? That is to say, it is almost impossible for others to translate
Download Windows Script control from Microsoft website. It is an ActiveX (r) control. After the download and installation are complete, create a new C # ApplicationProgramProject: select the reference node in Solution Explorer, right-click the Add
I was reminded that it is not a non-mainstream. Only non-mainstream talents use the word "non-mainstream.
So, I decided to change to: Gray mainstream.
The book is connected back and continues to talk about the namespace.
Is it difficult
We know that JavaScript is an OO language.
Of course, there are few non-oo languages, so only oo can not show our honor.
=. =
Okay, so let's change it:
Javascript is a super OO language !!!
Why?
For example, C #, you write a
VaR Title = Document. Forms [0]. Title. Value // obtain the report title
If (title. Length {
Alert ("report data does not exist, please make Statistics ")
Return;
}
VaR ksrq = Document. Forms [0]. bbksrq. Value
VaR jsrq = Document. Forms [0].
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