Original: Learn JavaScript notes from the beginning (i)--basicsSummary: The composition of JavaScript, the role of each component,First, the composition of JavaScript
Javascript
ECMAScript (CORE)
DOM
Summary:In the development of the project, we often encounter pop-up windows, some through the div simulation of the effect of the window, some through the IFRAME, but also through the window's own open function opens a new window. What we're
One of the tips here is how to use JavaScript to get the selected text on the page. The most critical JavaScript APIs are:Event= Window. GetSelection(); This selection is actually an object, but if we use it .toString() or force it into a
var t = [1,2,3,4,5];Some does not continue after it finds the first qualifying value in the arrayUsed to determine if the values in the array meet the requirements, and return the result True|falsefunction return type is BOOLvar some = T.some
Text: Some studies of javascript closuresThis article does not talk about the concept of closures, because the concept of easy to confuse people, this article hope that through a few vivid examples to explore the nature of closures, I believe that
Because jquery is very popular in the front-end development, so the source code is also based on jquery, in fact, it can be said that the current development has relied on it, who let it so good var Isdrag = false; var x = 0; A
This article does not talk about the concept of closures, because the concept of easy to confuse people, this article hope that through a few vivid examples to explore the nature of closures, I believe that the understanding of closures will
the most primitive class and object declaration methodsThe class declaration is as follows:var Cat ='' }If we want to declare an instance of the Cat class, the code looks like this: var // Create an empty object // Assigns a value Cat1.color =
Definition and usageThe splice () method adds/deletes an item to/from the array, and then returns the item that was deleted.Note: This method changes the original array.GrammarArrayobject.splice (index,howmany,item1,....., ItemX)
The principle of drag and drop: In fact, the distance between the mouse and the upper left corner remains the same. Let's see, this red dot is the mouse.Drag-and-drop is actually the location of the mouse to calculate the position of the object, it
How to solve the disabled problem of Web form submission in js, and how to solve the disabledjs problem in web form
This article describes how to solve the disabled problem js in Web form submission. Share it with you for your reference. The
Jquery simple image switching display effect implementation method, jquery Switching
The example in this article describes how to implement jquery simple image switching and display effects for your reference. The specific implementation method is
Native js achieves date linkage and js Linkage
Because too many conditions are involved in the determination of the month, if you use if else, the performance will be greatly reduced. We recommend that you use the switch syntax.
The Code is as
Native javascript implements image scrolling, delayed loading, and javascript latency
Effect: loading starts only when the image appears in the visible area in the drop-down scroll bar.
Ideas:
(1) img label: place the real image address in the
Use JavaScript to draw circles, arcs, slices, and js slices
Relationship between point p (x, y) on the circle whose radius is r and center O (x0, y0): x = x0 + rcosA; y = y0 + rsinA, and A is A radian
Example:
Js method for obtaining the return value of the prompt in the session box, jsprompt
This article describes how to obtain the return value of the prompt in the session box in js. Share it with you for your reference. The specific analysis is as
Data Structure and algorithm JavaScript (3) linked listWe can see that the queue and stack in the javascript concept are both a special linear table structure and a simple array-based Sequential storage structure. Because the javascript interpreter
Javascript (2) Global object usage1. Global Object: All attributes and methods defined in the Global scope are Global object attributes.2. The Global object is not directly used and cannot be created using the new operator. It is created when the
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