To do a message on the page on the function of the beep, originally wanted to use the HTML5 in the Audio+ie under the bgsound to achieve, but found that each browser to the audio of the type of decoding is not the same, suddenly a feeling of
Pit "The word, in this meaning is" trap ". Because JavaScript "weak language" nature, make it in the use of abnormal loose flexible, but also extremely easy "recruit". These pits are often hidden, so must be polished eyes, in order to learn and
Today, because the project needs to determine the user to leave the page to determine whether the user's behavior is closed or refreshedAlthough there is no direct method, but through a certain skill can also doHave to sigh the power of
There are several benefits to using link a instead of a button when cutting a page
Hand-like effect by default when mouse is placed (without adding cursor:pointer)
Can add pseudo classes supported by low version IE
If you click on the page to the
The following code is a test that recognizes the date of the month from the string, and you can see that the created RYMD this RegExp object executes once, and then executes again.
var datestr = "2014-9-8";
var rymd = new RegExp ("(\\d{4}|\\d{2
How to use
Compile the template and render the result immediately based on the data
Juicer (TPL, data);
Only compile template temporarily not render, return a reusable compiled function
var compiled_tpl = juicer (TPL);
I always encounter situations where it is necessary to check whether a function is native--a very important part of the functional test: The function is supported by the browser, or is modeled by a Third-party class library. The easiest way to
There is a special data type---function type in JavaScript, and every function of JavaScript is an instance of a function type. Because a function is an object, the function name is actually a pointer to a function object and is not bound to a
Sometimes this needs to be removed from the duplicated elements of the array, leaving only one. The first way to think of it is probably to use 2 for loops to compare and then remove the duplicate elements, as shown in the following code:
Method 1:
Recently in writing a JavaScript framework, just the Domcontentloaded event encapsulation, slightly small excitement, the development process encountered in the principles and compatibility issues to make a note, the province to forget everywhere
Today studied the point of flex technology, made a small demo, in the test found that often error, online discovery is a browser Flash Player version of the lower cause (need 10 and more versions), A summary of this is a way to determine browser
Let's pretend to do a task now: write JavaScript code as much as possible in the principle of functional language.
The next series of articles is to get you and me to embark on such a journey. First, we need to correct some of the concepts of
Getter is a way to get the value of a property, a setter is a way to set the value of a property. You can define getter and setter methods for any of the predefined core objects or user-defined objects to add new properties to existing objects.
It's a very weird thing to test out today. parseint (1.13*100), the actual return value is 112. Just look at the code.
Copy Code code as follows:
When you execute the above code, you will find that
Recently refactoring things, encountered the setting of namespaces, searched some knowledge, consulted some experts, write down their own experienceI believe you all know, window is the top, here is not to write window, first ignore1: About the top
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