In Javascript, because there is no scope concept, it is easy to have an identifier name conflict, especially in large projects, this kind of situation is more likely to happen, for example, the following code
The Code is as follows:
{Var temp =
Tips for taking notes on JavaScript. You can refer to the useful knowledge.
I. JavaScript Basics
1. try... catch uses lowercase letters. An error occurs when uppercase letters are used.
2. Throw Declaration
The role declared by throw is to
JQuery's gospel jQueryEasyUI open-source plug-in kit completely replaces ExtJS (reference) Front-end development. Many people prefer JQuery, but they are working on background management systems, especially enterprise management systems, for example,
The solution to jQuery dollar code conflict should be noted when jquery is used together with other js libraries. The following code:
The Code is as follows:
JQuery. noConflict ();JQuery (document). ready (function (){// Your Code ....});
JQuery.
Use the JavaScriptEval function. For more information, see. Worth noting
When the input is Json type, var user = eval (result. d) is required );
Use eval ("exception =" + result. responseText) when passing in a string );
The Code is as follows:
$.
I believe you have already learned about functions in JS. Some of these features are worth mentioning. Let's talk about the functions in JS. First, the function is also an identifier in JS. It can be assigned to a new variable or called through this
Regardless of the version, ie is always incompatible with Web standards. For code workers, it is naturally miserable. In order to consider the compatibility of IE, whether it is CSS or JS, it is often necessary to take special measures for IE, which
First, we will introduce several core functions of jQuery, which play a vital role in jQuery. They are also the most used in the actual front-end development process.
I. jQuery core functions
First, we will introduce several core functions of
JQuery code that shows or hides the text value displayed or hidden as the mouse focus moves in and out of the form input.
The Code is as follows:
Script$ (Function (){// Text color control in the input box$ ("Input: not (: last)" ).css
The alternative scheme of javascriptalert function, the method of a custom dialog box, we usually need to provide some feedback when using Javascript, there are many ways to complete this function. However, during normal development, the most
Jquerycheckbox and radio check Code. For more information, see.
1: Judge radio
The Code is as follows:
Var selected = $ ('input [name = selectid: checked] '). val (); // if not selected, val () = nullIf (selected = null ){Alert ("not selected!
In JavaScript, object attributes and Methods support four different types. For more information, see. The first type is the private type mentioned above. It features completely inaccessible to the outside world. to access them, you only need to use
Javascript multi-browser event overview. For more information about how to use some events to trigger these events, see. Description supported by event Explorer
OnClick IE3 | N2 | O3 mouse click event. You can click the event within the control
Javascript is a Prototypebased object-oriented language, which is different from the familiar. NET and Java language. It is based on the class mode (Classbased ). Therefore, javascript does not have the concept of classes. It is very important to
Many people know how to use this anonymous function, but they may not understand why this write can call the anonymous function. You may know that the parentheses behind them are the execution of the previous function, but you may not know the
There are several areas in this project that need to be entered recently. Since there is no validity verification for these areas at the beginning, there are many invalid dates in the result user input date, such as 2007-2-29, there are also error
JavaScript is already an indispensable element in Web development. It promotes the development of Web interaction at an increasingly high level. Many Web games are also developed based on such languages. Here are 12 very creative JavaScript games. I
Sometimes we need to use js to open a page, because js has different implementation methods for window. location and window. open. Below is a simple description of the differences. Window. location = "http://www.xxxxxxxx.net" With Backward function
Today I read a function that converts a string like word-word to wordWord.
The Code is as follows:
// Convert word-word to wordWordFunction camelize (s ){Return s. replace (/-(\ w)/g, function (strMatch, p1 ){Return p1.toUpperCas ();});}
Here we
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