Home, we want to understand the concept of strict mode, strict mode is a special mode of execution, it fixes some of the language deficiencies, provide a stronger error detection, disease enhanced security. You can perform strict patterns on partial
Statement
The IF statement automatically calls the Boolean () conversion function to convert the result of the expression to a Boolean value
For-in the order of the property names for the loop output is unpredictable, the return order
JS type conversions are divided into display type conversions and implicit type conversionsOne: Implicit type conversions1. Implicit type conversions present in the operatorThe "+" operator:var a=123, b= "123"var c=a+B; var d=b+a;After the "+"
The previous shortest IE decision by the use of IE does not support the characteristics of vertical tabs out.
Copy Code code as follows:
var ie =!+ "\v1";
Just need 7bytes! See this article, "bytes, EHR ..." 9, EHR ... 7!!!
var ie =!-[1,];
This code was previously known as the world's shortest ie decision code before IE9. The code is short but contains a lot of JavaScript basics in it. In This example , the code executes with the array's toString () method called First
The first argument for call and apply is the parent object that is to invoke the function, which is the invocation context, which is used in the function body to obtain a reference to it.
For example, if you want to invoke the function f with the
One, Conditional branch statement : if
Basic format:
if () {}else if () {}else{}
Execution process:
Second, the circular statement
2.1 Pre-Test Loop statement: Evaluate the export condition before the code in the loop body is executed.
Next let's look at the function-this magical object. When talking about the internal attributes of a function in the previous article, the internal attribute of this is not explained. However, before talking about this, I want to talk about the
JavaScript logical operator NOT (!) and (&&) OR (| |)Not (!) The type of the return value must be a Boolean valueThe operand is also a Boolean value return value is: With the opposite Boolean valueand (&&)1, two operands when the first is false or 0
In addition to binding functions to objects, we look at some of the other applications of the Bind method.Simple exampleExample: Suppose you have a simple function that assembles a URL string. The code is as followsfunction Simpleurl
Var ie =! -[1,];
This code was called the world's shortest IE judgment code before IE9. The code is short but contains a lot of basic javascript knowledge. In this example, the toString () method of the array is called before code execution. When [1
In the past, the shortest IE determination was developed by virtue of the feature that IE does not support vertical tabs.
Copy codeThe Code is as follows:Var ie =! + "\ V1 ";
Only 7 bytes! See this article, "32 bytes, ehr... 9, ehr... 7 !!! To
This article mainly introduces the statements in JavaScript, including condition branch statements, loop statements, Iteration statements, Lable statements, break and continue statements, with statements, and swith statements, recommended to friends.
The following sections describe a reasonable modern JavaScript development style guide, not a hard rule. Thelawofcodestyleconsistency is a highly unified code style ). The style you choose for the project should be the highest criterion. Place the
Next, we will review the javascript knowledge involved in the Code by breaking down this statement. If you need it, you can refer to the earlier shortest IE determination. with IE, vertical tabs are not supported.
The Code is as follows:
Var ie =
This article mainly introduces the statements in JavaScript, including condition branch statements, loop statements, iteration statements, Lable statements, break and continue statements, with statements, and swith statements, recommended to friends.
Basic concepts of JavaScript (iv) --- operators and javascript OperatorsOperator 1. unary operator
The operator that can operate only one value is called The unary operator. The unary operator includes the increment (decrement) operator and the
6. Execution Environment and scope (1) execution context: All JavaScript code runs in one execution environment. When control is transferred to the executable code of JavaScript, it enters an execution environment. The execution environment of the
Dom is not just for JS, many other languages also implement the DOM, but Dom is already an important part of JS.BOM is a part of the JS implementation, but there is no relevant standards, so each browser has its own implementation, the problem is
(默认: 自动判断 (xml 或 html)) 请求失败时调用时间。参数有以下三个:XMLHttpRequest 对象、错误信息、(可选)捕获的错误对象。如果发生了错误,错误信息(第二个参数)除了得到null 之外,还可能是 "timeout" , "error" , "notmodified" 和 "parsererror"。The first parameter returned by the error event XMLHttpRequest has some useful
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.