Chapter III study One, variableTo use the var operator when defining a variable, each variable is simply a placeholder for holding the value. Note: Variables defined with VAR can be changed to local variablesii. Types of data1. Five simple data
This section mainly through an adder, describes how JS debugging. First on the code:Test.html: Calculator Calculators + = Calculation Demo.js/** * Created by Yanzi on 15/12/8. */var
JavaScript often compares the size of strings, sometimes confusing, so simply comb the comparison of JavaScript strings: 1. Number comparison Console.log (' number comparison: ' + ( ' flyelephant ')); False Console.log (' string and number
1.forEach functionBoth Firefox and Chrome's array types have a foreach function. Use the following: "-//W3C//DTD HTML 4.0 transitional//en"> New Document "Author"Content="oscar999"> HTML notation:int 0 "'" + t+"'"; i++; })// non-JS notation,
In their own study of JavaScript design patterns in the process, accidentally write a piece of code to understand the deeper, the reason is called pseudo-singleton mode, because the result of this code is very much like a singleton mode, but in fact,
First, true and false judgmentTrue: true, not 0 digits, non-empty string, non-empty objectFalse: False, number 0, empty string, empty object, undefinedExample: if (0) {Alert (1)}else{Alert (2)}The result is 2.Two, JSON and for inExample: Var obj={aa:
The callback function is used to pass one function as a parameter to another function as the return result in another function.Here is a simple example of a callback function: Tom went to the store to buy something, just out of stock, the shopkeeper
JavaScript is a scripting language, called JS, simple structure, easy to use, the code can be placed directly into the HTML document, you can directly in the JavaScript-enabled browser to run. JavaScript makes Web pages more interactive, more vivid
1. Defining objects using object literalsvar person={}; When you create an object this way, you do not actually call the object constructor. developers prefer the syntax of object literals. 2. Sometimes when you need to pass a large number of
Functions are a set of statements that can be run anywhere, and functions as the core of ECMAScript are important. The function is event-driven or when it isA reusable block of code that is executed when it is called. That is, a function is a piece
1. Invocation of functions and creation of objects1) A pair of parentheses (): Used to invoke the function;2) if new FN () is used before the function name, this is the creation of the object; It is divided into two steps: 1.new creates an empty
Report a very strange issue of the IE scroll bar -- the scroll bar is abnormal when the percentage calculation width is floating point.
Cause:
During project creation, a table with more content than the DIV container is automatically rolled
A deep understanding of pseudo elements and a deep understanding of pseudo elementsDirectory [1] Definition [2] usage first-letter first-line before after selection [3] Highlights [4] DEMO first-word sinking nail effect image superposition effect
JQuery auto trigger event trigger usage
Sometimes, you need to simulate user operations to achieve the click effect. For example, after a user enters the pageThe click event is triggered without the need to actively click.
For example, the following
Iframe usage summary, iframe usage
is a form of framework, which is also commonly used.
Example 1.
Needless to say.
Width: the width of the inserted page; height: the height of the inserted page; scrolling: whether to display the page scroll bar (
Call between html iframe elements, iframe call
Call between html iframe elementsI. IntroductionIframe is usually used when an independent page needs to be introduced. When necessary, we need to interact between the parent page and the iframe page.
Ul li sets the horizontal bar and removes the dot before li, ulli
Effect preview: http://hovertree.com/texiao/css/How to Use CSS to make horizontal menus for ul li horizontal arrangement and dot ProcessingWe first create an unordered list to create
Html element types: block-level elements, inline elements (also called intra-row elements), and inline block-level elements ., Element inline
Tag elements in html are generally divided into three types: block-level elements, inline elements (also
From the three-column adaptive width layout to the css layout, adaptive css
How can we achieve a three-bar Adaptive Layout with PX on the left and right, and the center is adaptive with the browser width?
The first thought is to useTable Layout, Set
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.