When JS uses onmouseover and onmouseout, when the mouse moves to the child element of the element, the two events of the current element will also be executed,
To solve this problem, add a judgment statement:
Code highlighting produced by Actipro
First, implement a foreach function that traverses the array:
1 Function Foreach (array, func ){ 2 For ( VaR I = 0; I ){ 3 Func (array [I]); 4 } 5 } 6 7 Function Logprint (element ){ 8 Console. Log (element ); 9 }
Yesterday I read the chapter in "Pro JavaScript techniques" that uses js to improve the form.CodeI tried it again and debugged it with firebug for half a day. I found some small problems in the book. I will discuss them in the following review
Http://www.cnblogs.com/birdshome/archive/2005/02/17/105403.html
Prototype is a basis for JavaScript to implement object-oriented programming, but it is not the only method for constructing classes, we can write classes without using prototype
From: http://www.cnblogs.com/robot/archive/2008/04/20/1161801.html
A new bug was found: 10 is smaller than 2 because sort is sorted by ascii by default. This problem has been fixed.
Download the latest demo [fixed some known problems, and
Add the minesweeper Development Project of xingd.
We are ready to use JavaScript to implement lightweight clearance games. For convenience, the underlying framework is developed using jquery.
Compared with the complex system requirements of
Case Sensitive
Double quotation marks
Most developers use single quotes, because xthml requires that all XHTML attributes must use double quotes.
VaR html =' H2 Class = "" > A list! H2 > '+' Ol > '+' Li Class = "" >
Javascript uses "Object-Oriented Programming" or "Object-Oriented Programming. The so-called "Object-Oriented Programming" refers to dividing the scope of JavaScript into large and small objects. objects are still divided into objects until they are
I went back to the countryside last night, so I didn't have time to write a blog. Now let's continue. Today I learned the object model enhanced by ecmascript 5 and some built-in JavaScript objects, to sum up. Let me explain it first. I am also a
Pay attention to the following points on the basis of understanding the scope chain:
1. Reading and Writing local variables in a function is always the fastest, while reading and writing global variables are usually the slowest. Remember that
Use the keycode attribute of the event object to determine the Input key valueEg: If (event. keycode = 13) Alert ("Enter !");Key value tableA 0x65 u 0x85B 0x66 v 0x86C 0x67 w 0x87D 0x68X0x88E 0x69 Y 0x89F 0x70 Z 0x90G 0x71 0 0x48H 0x72 1 0x49I 0x73 2
Don't try. I don't know if it's easy to use.
Function getcookie (name) // The cookie function {var arr = document. cookie. match (New Regexp ("(^ |)" + name + "= ([^;] *) (; | $)"); If (Arr! = NULL) return Unescape (ARR [2]); return NULL;}
First, let's assume that we need a say method to use one sentence, and a walk method to represent taking a step. Then let's implement the definition of the two methods in five ways.
1. Function say ()
{
Alert ("Hello World ");
}
When I read another blog today, I found thatArticleI have been talking about function declarations and function expressions,
I was a little dizzy, and I sorted it out later. In fact, these two concepts have been used before, but they are not
The sub-nodes can only be set to the same state as the parent node when the parent node is selected or not selected.
Sometimes, when selecting a child knot, we want its parent node to be selected at the same time. The following Javascript
Code This
Difference between IE and Dom Browser
In various examples in Javascript event processing (I)-basic principles, the event listening generated by addeventlistener () is valid in chrome and firfox, but is invalid in IE, this is because IE implements
During programming, you must inevitably encounter complex functions. Beginners are most afraid of complicated functions. because they cannot well divide functional boundaries, they can only stack a large string of IF, loop, and case.
Program They
After using JavaScript for more than a year, the closure is always confusing. I have been familiar with some closures and made several mistakes due to my incomprehension of closures. I have read more information over a year, but I still don't quite
I have two pages. The homepage is add_rz.aspx, And the subpage is open_kh.aspx. In order to realize the subpage value passing to the parent page, I found some implementation methods on the Internet. Later, because the project needs to be modified to
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