JavaScript is single threaded, at the same point in time, it is not possible to run two "control threads" simultaneously.Event handlers and Event objects1. Registering an event handleStandard and non-standardvar Button=documenbt.elementbyid
//inheriting from the parasitic construction method varmyarray=function(){ varArr=NewArray (); //Add ValueArr.push.apply (arr,arguments);//and the following loop an effect //For (var i = 0; i //Arr.push (Arguments[i]); // } //=========
Clientwidth=contentwidth+padding, understood as: Customer area width = body width + Inner padding width, does not include the width of the scrollbar, clientheight the same way.Offsetwidth=contentwidth+padding+border (ie, clientwidth+border),
Asynchronous Programming :On the browser side, asynchronous programming is important, and lengthy operations should be performed asynchronously to prevent the browser from losing its response. The most common example is sending an asynchronous
1, Eleobj.addeventlistener (eventname,handle,usecapture);Eleobj:dom elements;EventName: Event name. Note that the event name here does not have "on", such as mouse click event DoubleClick, mouse double click event, mouse move into event mouseover,
thisUse of keywordUsing in JavaScriptthisKeyword represents the object that invokes the method, which is the same as most object-oriented languages. But becausecall、apply、bindThe effect of such functions. We can changethisThe object being referred
1. Creation of strings
var str = "Hello microsoft!";
2. String Properties
Constructor returns a function that creates a string property length returns the lengths of a string prototype allows you to add properties and methods to
1.documnet function
Method
Description
Close ()
Closes the output stream opened with the Document.open () method and displays the selected data.
getElementById ()
Returns a reference to
1. dialog box, Output box, warning box
1. document.write () can be used to write content directly to the HTML output stream. The simple thing is to print the content directly in the Web page. 2.alert (string or variable); The 3.CONFIRM message
Form Object Properties
Properties
Description
Acceptcharset
A character set acceptable to the server.
Action
Sets or returns the Action property of the form.
Enctype
Events are typically used for browser and user actions to interact. First appeared in IE and Netscape Navigator as a means of sharing server-side computing load. Event handling is supported until almost all browsers. And the DOM2-level specification
Basic JavaScript Concepts1. Case-sensitive, variable name test and test are two different variables, and function naming can not use keyword/reserved words, variable naming specification: The beginning character must be a letter, underscore, or
Each design pattern appears to compensate for the lack of language in certain areas, and to solve the problems in a particular environment. The mind is interlinked. However, different design languages have their own specific implementations. For
1. The variable is of no type, and the value (direct amount) only has the type.The return value of 2.typeof has ' string ', ' number ', ' Undefined ', ' Boolean ', ' object '.When you operate on a variable, 3.typeof is actually the type of the value
Because JSON is very simple, it quickly swept the web world and became the ECMA standard. Almost all programming languages have libraries that parse JSON, and in JavaScript we can use JSON directly, because JavaScript has built-in JSON parsing.To
Js obtains the width of the browser and device (the screen width), jswidth
First, we will describe the data of the iPhone as follows:
We need to understand many things, such as logical resolution, physical resolution, scaling factor, and ppi. We
Install and configure Apache
From today on, I will start learning about Web development. This series of blogs will record the gains and confusions in my learning process. From the front-end to the back-end, I will explore the Web development process
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