Basic concepts
javascript是一门解释型的语言,浏览器充当解释器。
Delay script
The defer attribute is defined in HTML4.0.1, and its purpose is to indicate that the script does not affect the construction of the page when it executes. That is, the script is deferred
First, some concepts
① Traditional ajax: Interactive data format--custom string or XML description;
Cross-domain-Resolved by server-side proxy.
② today's best scenario: Use JSON format to transfer data, use JSONP to cross domains.
③json: A data
We know that the operators that detect object types in JavaScript are: typeof, Instanceof, and the constructor properties of objects:
1) The typeof operator TypeOf is a unary operator, and the return result is a string indicating the type of the
Dodo previously in the group on the Online web page test screenshots of the site, then forgot to collect, the results in the chat records find a long time to find, first recorded here:
http://v03.browsershots.org/
Have time to write their own
3 ways to get function namesExample 1:
A way to see in the JS authoritative guide:
Function.prototype.getName = function () {return THIS.name | | This.tostring (). Match (/function\s* ([^ (]*) \ (/) [1]}
Example 2:
If the current function is a
Using JavaScript to determine the Office version is useful in project development, by being an online Office editor in OA system, where we need to have Office Online editing tools that support multiple versions of Office, such as Office2003, 2007.
This example describes the JavaScript Cross-domain request wrapper function and usage. Share to everyone for your reference, specific as follows:
First, the source code
Defines the JSON (function () {if (typeof window. $JSON = = ' undefined ')
This article for everyone to share the JS to create the object of a variety of methods to share the pros and cons of a method, the specific contents are as follows
The first way to create an object:
Creating a JSON ObjectRecommended occasions: As
Some languages, such as C and Java, have block-level scopes, where each piece of code within the curly braces has its own scope, and variables are not visible outside of the code snippet in which they are declared, but JavaScript does not have a
JS decoding and Coding-html
Copy Code code as follows:
javascript encoding and decoding
Crazy han san xiong up!
Use of SetInterval and settimeout in JS. html
Await/async is one of the most important features of ES7, it is the best asynchronous solution for JS so far. Although not entered in the ES2016, but soon arrived, is now in Es-next Stage 4 phase.
Direct examples, such as we need to get in order:
IntroducedThis plays a very important role in all kinds of opposite object programming, and is primarily used to point to the object being invoked. However, in JavaScript, this is a significant difference in performance, especially in different
IE7 loads and parses all style sheets into a form of that Explorer can understand. You can then use most CSS2/CSS3 selectors without have to resort to CSS hacks.The lightweight script is a single-line inclusion in your Html/xml document. No
This is my own to do a carousel map, you can see, I have not been optimized. Where there's room for improvement, private conversation.
The layout, whatever you're doing.
' 1 2 3 4 5 6 > var
c = 0;
var T; Window.onload = function () {t
Oddly enough, the JavaScript language actually has two values that represent "none": Undefined and null. Why is that?
First, similarityIn JavaScript, assigning a variable to undefined or null is, to be honest, almost indistinguishable.
Copy
One, what is argumentsArguments is a built-in object in JavaScript, it's quirky and often overlooked, but it's really important. All the major JS libraries use the arguments object. So agruments objects must be familiar to JavaScript programmers.All
Describe
Language elements
In the TextStream file, returns True if the file pointer crosses the End-of-line flag, otherwise it returns FALSE.
AtEndOfLine Property
Returns True if the file pointer is at the end of the
This is an important keyword in object-oriented languages, and understanding and mastering the use of this keyword is critical to the robustness and elegance of our code. And JavaScript this is different from Java, C # and other pure object-oriented
Recently collected some methods about JavaScript binding events, summarized, not comprehensive, but, I hope to facilitate the future to see for themselves.
There are three main ways to bind events in javascript:
1 binding directly in a DOM element
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