The Firefox browser is compatible with JavaScript scripts)
Keyword:
The Firefox and IE scripts are incompatible.
1. Windows. Event compatible scripts
Function getevent () {// gets browser events, and is compatible with
Batch filling of arrays in JS:
1. Fill in the statement at the same time
VaR Beatles = array ("John", "Paul", "George", "ringo ");
2. We don't even need to explicitly indicate that we are creating an array. In fact, we only need to enclose a
DHTML is short for "Dynamic HTML" (Dynamic HTML). Strictly speaking, DHTML is not a single new technology, but a combination of HTML, CSS, and JavaScript.
DHTML:
Use HTML to mark webpages as various elements;
Use CSS to design typographical
This may be a deep topic. What is Asynchronization?
In general, asynchronous execution is delayed in JavaScript. Strictly speaking, the asynchronous programming capabilities in JavaScript are provided by BOM and Dom, such as setTimeout,
Javascript is an extremely powerful and flexible scripting language. unfortunately flexible, for example people, means fallible. I am going to highlight 5 best practices that you can use in any JavaScript project. these are very broad, I will follow
The following describes the solution adopted by the blog Garden (the code is directly copied to the blog Garden)
// Global variable: Indicates whether a prompt is required to mark the current page (you can also declare whether it has been submitted
Reprinted from: http://hi.baidu.com/yydriver/blog/item/2f5ffc45f8bcbc2dcffca3d9.html
Writing a script for an XMLHTTP request is not difficult. You can write it in two or three lines.
However, every time you write data, you will find that there are
I am very interested in the extended scrapbook function of Firefox to save selected text and images. It should be a DOM operation to make it perfect. View the HTML of the selected content ).
In fact, what I want to achieve is to send this part of
Modify from http://blog.csdn.net/dallasnash/archive/2007/04/18/1569068.aspx
There is not much change, mainly because the error message is returned, so that the alert part can be called. It is said that regular expressions can be used for
From: http://www.jb51.net/article/17459.htm
I have reprinted an article: http://www.cnblogs.com/GuominQiu/articles/1640380.html
In addition, why does this post discuss?
Extract key (last section)
The description in the JS Reference Manual
Generally, window. onload is enough. To load multiple events, we can use the following method:
Window. onload = function () {func1 (); func2 (); func3 (); // more loading events ..................}
But if we need to do something before the page is
For many friends who want to learn JavaScript, it is undoubtedly the biggest headache for them to choose getting started books. It may also be the reason they have been afraid and even gave up learning JavaScript.In JavaScript, I am neither an
A simple and important concept for clearing simplified code is namespace ). Currently, JavaScript does not support namespaces (different from Java, C #, and Python), so we have to use a similar method to achieve the appropriate effect.
In fact, the
There are three methods to define a function in javascript:
(1) declare an expression variable and define the expression of the variable. For example:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
To understand the functional programming principles in Javascript, you must understand two knowledge points:
1. Calls of functions and methods in Javascript
In JavaScript, there are two methods to call functions. The general method is to put
This pointer is an important concept in object-oriented programming. It represents the currently running object. When implementing the object method, you can use the this pointer to obtain the reference of the object itself.
Unlike other
The parsefloat () function parses a string and returns a floating point number.
Its syntax is: parsefloat (string );
Note: Only the first digit in the string is returned. spaces at the beginning and end are allowed.
Tip: if the first character of a
I. Opening
Dragging is already an old JavaScript topic, but it is also one of the most classic problems. Here, I use the object-oriented method to implement simple drag and drop, which is the basis for complex JS effects.
Ii. Principles
The drag
I. Opening
After writing the last few drag-and-drop articles, many friends commented that it would be better to persistently drag the results. After learning about JavaScript's cookie operations and a little JSON knowledge, I modified the code of
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