JS. encode is in JS
Code The garbled Code formed after encoding can still be well executed in addition to being unreadable.
JS encryption code decoding methods are usually available on the webpage. However, due to the escape characters in the
Take the following JS
CodeJoin the page.
[HTML]
[/Code]
Solution: We recommend that you install another browser, disable JS, and use this browser to access various code controlled by Js.
Jquery, mootools, ext, and other class libraries are very difficult to implement in this part. It is very difficult to compile this part. After in-depth research on their implementation, I finally made a very concise version based on my accumulated
The constructor attribute always points to the constructor that creates the current object. For example:
CopyCode The Code is as follows: // equivalent to VaR Foo = new array (1, 56, 34, 12 );
VaR arr = [1, 56, 34, 12];
Console. Log (ARR.
In JavaScript, the global environment itself is an object. In the browser host, this object is a window, and when Javascript is used for other non-browser hosts, such as embedded environments, it may be other objects.
I have also corrected this idea.
I. Operators
CopyCode The Code is as follows:. [] () attribute access and function call
Delete new typeof + -! Unary operator
*/% Multiplication, division, modulo
+-Addition, connection, and Subtraction
>= ===! = Equality operator
& Logic and
|
Code As follows:
Copy code The Code is as follows: function g (n ){
VaR n = n. tostring (2 );
VaR COUNT = 0;
For (VAR I = 0; I {
If (N [I] = "1 ")
Count ++;
}
Return count;
}
I think this writing is very troublesome. I suddenly thought that I
Function
Code As follows:
Copy code The Code is as follows :/*
* Arithmetic precision correction function
* M value 1 (number)
* N value 2 (number)
* Op operator (string)
*/
Function fixmath (m, n, OP ){
VaR A = (m + "");
VaR B = (n + "");
VaR x =
【
Program Source code]
This effect is mainly reflected in the combination of CSS and JavaScript.
CSS
Code
Copy code The Code is as follows: ul, Li {margin: 0; padding: 0; Border: 0 ;}
. Shop-rating {
Height: 25px;
Overflow: hidden;
Zoom:
Each function has a variable named arguments, which saves the currently called parameters in an array like an array. In fact, it is not an array. If you use the typeof arguments statement to try to return "object" (object), it cannot use push and
In addition to normal usage, slice is often used to convert an array-like object to a true array.
Glossary: array-like object-objects with the Length attribute, such as {0: 'foo', Length: 1}, or even {length: 'bar '}. the most common array-like
When it comes to object-oriented, we can think of classes, objects, encapsulation, inheritance, and polymorphism. Translated by Cao Li and Zhang Xin in "javaScript Advanced Programming Design" (People's post and telecommunications press.
1. convert a number into a String and apply "" + 1. Although it looks ugly, the efficiency is actually the highest. In terms of performance: ("" +)> String ()>. toString ()> new String (): internal operations that can be used during compilation are
The Ancients "Teach fish, it is better to teach fish". Without a teacher, they can only learn "fish" by themselves. Let's start with something simple!
The following code is the most familiar, but do you know why? Why is the jQuery object introduced
First, the simplest one is:
Copy codeThe Code is as follows: // The following lines of code demonstrate the namespace, class, and function simulation definition and usage:
NameSpace = {};
NameSpace. Class = function (){
This. Method = function (info)
Window. opener usage
In a textbox with the id "name" on window. opener worker, you can write it:
Optional values opener.doc ument. getElementById ("name"). value = "input data ";
I have no good understanding of window. opener in javascript.Why is
The first piece of code emphasizes this usage. I used a switch in my project. Later I found this code ugly, so I wrote it as |, later, when I tested the performance, I found that the performance was an order of magnitude. It can be seen that this
However, they do not need many ancillary functions of the plug-in, and there is no need to reference this library for such a functional area for speed consideration. Of course, you can also use the server, but in fact, this effect is not necessary,
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