Debug JavaScript with faster speed and higher efficiency
Familiarity with tools allows tools to play a greater role in the work. JavaScript is hard to debug, though, but if you have a few tricks, you can use less time to solve errors and bugs.
There
First, why use Require.js.
At the earliest, all of the JavaScript code was written in a file, and it was enough to load the file. Later, more and more code, a file is not enough, must be divided into multiple files, sequentially loaded. The
We often use this feature when we read blogs, of course, sometimes also want to put their own web site to join similar sharing function, the major manufacturers have given the corresponding API, click a button can pop-up window into the sharing, we
Use JavaScript to get when the mouse (cursor) position in the page is used in many situations, such as drag and drop, hover hint (tooltip), and so on. Of course, we still have to face the compatibility of browsers, in different browsers, these
CheckBox or button to implement the checkbox in the form of all select or reverse, the code is very simple, all the code is as follows:
insert title here Serial number Choose 1 2 3 All
Effect Demo
Q
javascript: Deep understanding of JS closuresSeptember Maple Forest released in 2012-4-24 10:33 view number: 4375 Comments: 25 post Mode
Closures (closure) are a difficult and unique feature of the JavaScript
1 Promise Overview
The Promise object is a specification proposed by the COMMONJS workgroup to provide a unified interface for asynchronous operations.
So, what is promises.
First, it is an object, that is, the use of other JavaScript objects, and
WebBrowser is the IE built-in browser control, without the user download, you can implement the client page printing.
There are other uses for this component, as listed below:
Code:
The meaning of a function is as
Usually, in the FAT client B/s from the program, front-end JavaScript script is the most difficult to maintain, because of the diversity of the client's operating environment and the script to run the owner of the dependency, developers often can
A few years ago to learn JavaScript, then learn more simple, and now began to learn, found that JavaScript is actually very difficult, some places still have to spend time to understand, so read a lot of video and blog, their own here a small
Ix. Forms
1. Validate the form (validating a form)
Q: How do I validate before the form data is submitted to the server?A: To validate the form's input, you can call your validation function in the form's OnSubmit event handler. When a user submits
Just contact ArcGIS for JavaScript, look at the example, look at the feeling of adding a map is very simple, but some of the content do not know what to do, first to understand
1, need to add ESRI CSS file path such as:
2, need to set the content of
The various functions of function in JavaScript are sorted out, the sense function is a big object, all kinds of knowledge points can be involved, not only function this itself native reference type of various usages, but also include execution
function Getcheckedvalue (radioobj) ... {
if (!radioobj)
Return "";
var radiolength = radioobj.length;
if (radiolength = = undefined)
if (radioobj.checked)
return radioobj.value;
Else
Return "";
for (var i = 0; i if (radioobj[i].checked) ...
The prototype chain is one of the basic content of JavaScript. Its essence is the design logic inside JavaScript.First look at a set of code:1Summarize the points of knowledge:Prototype is a property of a function (each function has a prototype
about This, generally who called The method that this method is pointing to, This is pointing to the object that is currently called (I am the most beautiful), the callback function inside the This will point to (heavy)If there are multiple calls,
Reference Links:119000001264648853086893?locationnum=12&fps=152914876Let's look at a few concepts:function Call stackThe bottom of the stack is always the global context and the top of the stack is the currently executing contextFunction Execution
The so-called recursive function call is to call its own function.1 var NULL ; 2 function A () {3 console.log (123); 4 Timerhandler = SetTimeout (A,n) ; 5 }6A (); 7 // cleartimeout (timerhandler);-------------------------------------------
The first is the HTML code You have 3 chances left And then the CSS code.Body{padding:0;margin:0;}. Box{width:640px;Height:640px;Border-radius:50%;margin:150px Auto;position:relative; }img{width:100%;Height:100%;Transform:Rotatez
Window stands for browser window, width height these thingsNavigator Browser name, version, user-agent and other thingsScreen information on computer screensLocation URL InformationDocument page InformationHTML is represented as a tree structure in
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