JavaScript has two conversion methods for data types:
(i) converting an entire value from one type to another (called a basic data type conversion)
(ii) Extract the value of another type from one value and complete the conversion work
Copy Code code as follows:
function $ (ID) {return document.getElementById (ID);
The above is not a problem for the new version of the browser, if you use the old browser, you can use the following function
Copy Code code as
2.1 Select the appropriate editing tool for your own
1. Notepad 2. Ultra Edit32: Have the key liao coloring, AutoCorrect keyword 3.EditPlus: The browser embedded in its own window, you can browse the Web effect at any time.
4.1st JavaScript Editor,
1.js Regular Expression (RegExp object)
The RegExp object has 3 methods: Test (), exec (), and compile ().
①test () method
The test () method retrieves the specified value from the string. The return value is true or false.
var patt1=new RegExp ("E")
Javascript Determines whether two IP is on the same network segment
The following script does not judge the IP format and only determines whether two IP is in the same network segment.
Example, JavaScript determines whether two IP is on the same
One, the effect shows
Ordinary three Div
Drag the mouse to select the effect
Select all of the DIV
This does not seem to see the effect, it does not matter, we have a magic gif animation, to a whole animation effect feel.
Second, code
The ECMAScript variable contains values of two different data types: the base type value and the reference type value. The base type value is a simple data segment, whereas a reference type value refers to objects that may be composed of multiple
Please note that the effect of example2.html under Firefox is not rounded in IE, because of compatibility.
And the trigger action too fast will cause each Li to increment two times to three times, this reason is not related to the class (Action.js)
Learning a programming language is nothing but two aspects: one is grammar, the other is data type. The syntax of Class C language is nothing more than if, while, for, function, arithmetic, and so on, and object-oriented language plus object.Grammar
The concept of two-fork tree
A binary tree (Binary) is a finite set of n (n>=0) nodes, the collection is either an empty set (a null binary tree) or a two-forked tree of a root node and two disjoint Saozi, called root nodes, respectively.
The
1. Match pattern Mark:
The g------represents the global schema, rather than finding that the first match succeeds and ends immediately.
I-------indicates case-insensitive mode
M-----represents multiple-line matches, and the next line continues to
Creation of arrays
First type:
Copy Code code as follows:
var colors = new Array ();
var colors = new Array (20);//Create an array containing 20 items
var colors = new Array ("Greg");//Create an array that contains 1 entries, the
Before you mention the above concepts, first of all, let's talk about the implied parameters of functions in javascript: arguments
Arguments
The object represents the function being executed and the arguments of the function that called
This article describes the JavaScript implementation to get picture size and image scaling method. Share to everyone for your reference, specific as follows:
Get picture size:
var originimage = new Image ();
function Getimagewidth (oimage) {
Manipulating the parent window object in Modaldialog
1, can not use window.parent
Window.parent is used to operate in a frame and cannot be used to manipulate the parent Window object in a dialog box
2, the right way
Action by passing
The ultimate goal is to write a swing in JavaScript to determine whether or not to perform this function, but in the process of execution, there is a problem, and each time it is executed, it is inserted directly into the database and is not
One, Conditional branch statement : if
Basic format:
if () {}else if () {}else{}
Execution process:
Second, the circular statement
2.1 Pre-Test Loop statement: Evaluate the export condition before the code in the loop body is executed.
JavaScript Math.ceil methodThe Math.ceil method is used to rounded up a number to get the smallest integer greater than or equal to the value. The syntax is as follows:
Math.ceil (x)Parameter description:
Parameters
Description
In JavaScript, arrays can be created using the array constructor, or created quickly using [], which is also the preferred method. An array is a prototype that inherits from object, and he has no special return value for TypeOf, and he only returns '
Pass the function as a parameter into another function. This function is called a callback function.
It is often the case that the layer A and B of a project are coordinated by different people. Layer A is responsible for the function funa,b layer
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