JavaScript has only one numeric type number, and all numbers in JavaScript are represented in the IEEE-754 standard format. The problem with the precision of floating-point numbers is not JavaScript-specific, because some decimals are infinite in
Because of the previous understanding of JavaScript is not deep enough, a time of unprepared.
Later, after two master colleagues of the guidance (to the two colleagues of admiration like the surging river endless ... ), suddenly enlightened
The
Before you read this article, you can read the offsetleft, offsettop, Offsetwidth, offsetheight properties of JavaScript Drag & Drop Series 2 to clarify the context.
Okay, let's get to the point.
The same properties/methods as the model
1 Button
This example for you to share the Special JS text input box Web effects, for your reference, the specific content as follows
instance one: make the text box underlined only
Example two: initials or all uppercase letters
In fact, 7 sample scripts use some form of CSS modification. For example, form validation changes the style of an error form field, and the XMLHTTP speed Tester uses animations (that is, changing a style several times in a short time) to get the
Objective
JavaScript date formatting is common in everyday development, so let's share two examples of how to use the JavaScript time format function.
Method One
Date.prototype.pattern=function (FMT) {var o = {"m+": This.getmonth ()
There are three types of nodes: element node, attribute node and text node.
The main point of Dom is to check the additions and deletions around element nodes and attribute nodes . The following are described separately from the operation of
Presumably everybody knows, Javascrip is the whole stack development language, browser, mobile phone, the server side can see JS figure. This article will share some of the most efficient JavaScript best practices to improve your understanding of JS'
append rows to a table
In the past experience with Ajax, you would most likely use JavaScript to append rows to an existing table or create a new table from scratch that contains a table row. The Document.createelement and Document.appendchiid
This article will continue to add my own native JS write a variety of menu effects, although a lot of online search, but I still like to write a write! This is previous: JavaScript combat (navigation menu with unwinding and animation effect) The
One, what is closure?
The "official" explanation is that a closure is an expression (usually a function) that has many variables and an environment that binds them, and therefore these variables are also part of the expression.I believe very few
Object-oriented languages, such as Java, have concepts of classes, and you can create any number of objects with the same properties and methods through a class. However, JavaScript does not have a class concept, so its objects are also different
For the new, JavaScript prototype is a very annoying thing, one prototype easy to confuse with __proto__, and the various points between them is really a bit complicated, in fact, there have been a lot of articles on the market to try to say clearly,
In the study of "High performance Web site construction Guide" This book, this article is a learning note, will be learned to clean up the things, easy to see later.
The performance Golden Rule (performance Golden) explains that only 10%~20% end
Normally, window.onload is sufficient, and if you want to load multiple events, we can do the following:
Copy Code code as follows:
Window.onload = function () {
Func1 ();
Func2 ();
Func3 ();
More load events ....... ......
}
The code is as follows:
Copy Code code 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;
}
Think this write is very troublesome,
The difference between textcontent and innertext
There is a innertext property under IE, FF has a textcontent attribute. Many of the former to write to IE script, in the FF can not find the innertext attribute, so the internet found the suggestion
The first important element in this book is the interface.
We should be familiar with the interface, simply say that the interface is a contract or specification. In strongly typed object-oriented languages, interfaces can be easily implemented.
In JavaScript development, people ask: What's the difference between null and undefined?
A bad time to answer, especially undefined, because this involves the realization of the principle of undefined. So, after thinking carefully, write down this
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