This paper is mainly about three questions
Prototype and Proto
Function and Object
What the hell happened to new?
Prototype andProto__proto__ 到底是干嘛的1. __proto__ 就是 Javascript中 所谓的原型 (这里,我们还是拿具体的例子来说明吧) function a (name)
1. Standard character sets and\d: Any number, one of 0-9;\w: Any alphanumeric underline, i.e. A-Z, a-Z, one of the 0-9,_;\s: One of the whitespace characters, such as spaces, line breaks, tabs, and so on;.: The decimal point can match any one
?SceneRecently there is a scenario that infers that the current user has no edit permission on the project and that the JavaScript is complete. It took a long time to get it out. Share, have the need to expand it, in detail such as the
this+jsonThis article is from the "12897581" blog, please be sure to keep this source http://12907581.blog.51cto.com/12897581/1926407JavaScript------->this and JSON
The 6 types of data in JavaScript are as follows:
Numbers (number)
Strings (String)
Boolean (Boolean)
Null
Undefined (Undefined)
Objects (object)
1. Numbers:In JavaScript these are all valid numbers:151.50-1Oxd (is
The following are some of the common form events in JavaScript;One, OnSubmit: The event that occurs when the confirmation button in the form is clicked, as in the following case.Case resolution: Popup content submitted in the form formname=
Object serialization in short, the object is converted to a string. In the process of data transmission, object serialization is often used.Serialization of objects commonly used in javascript: Json.stringify ();Deserialization of objects commonly
Sample HTML code:id= "Test"> style= "color : Red ">test1span> test2 Div >Get the DOM object with ID test, which is not available below.var test = document.getElementById (' test ');Test.innerhtmlDescription: The entire contents of the object from
Closed PackagefunctionPerson (name) { This. Username =name; varUserage = 18; //This method allows you to impersonate a private member //similar to private members This. Setage =function(age) {Userage=Age ; }
1, SetAttribute (): Set the value of the property;GetAttribute (): Gets the value of the property;RemoveAttribute (): Remove attribute;2, offsetwidth:offsetwidth = Width+padding+border;Clientheight:clientheight = width+padding;3. Event object in
1. Window Object Properties
Properties
Description
Closed
Returns whether the window has been closed.
Defaultstatus
Sets or returns the default text in the window's status bar.
1. Creation of array objects1. Set an array of length 0 var myarr=new array (), 2. Set an array of length n var myarr=new arr (n); 3. Declares an array of the specified length of an assignment var myarr=new myarr (1,2,3,4,5,6 ); 4. Assigning a value
Tag: Use class to specify location console specify = = Loop object ContinueThe first time you see a label statement is such a scenario:function foo () {x:1}At that time very puzzled, why not error? Object can be written like this?Later know this is
Use a vector image instead of an image.
Use a vector chart instead of an image.For most patterns and icons, vector images are smaller and can be scaled without generating multiple sets of images. Mainstream browsers now support SVG, so you can use
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