JavaScript Bold Method
The LastIndexOf method returns the bold string defined using the HTML b tag. The syntax is as follows:
Copy Code code as follows:
Str_object.bold ()
Tip: This method does not conform to the ECMA
JavaScript fromCharCode method
The fromCharCode method converts one or more Unicode values to (uppercase) strings and returns the string. The syntax is as follows:
Copy Code code as follows:
String.fromCharCode (NUM1, num2, ...)
ECMA-262 describes a set of keyword-specific uses that can be used to indicate the start or end of a control statement, or to perform a specific operation. Rules: Keywords are reserved for languages and cannot be used for identifiers.
All keywords
JavaScript gets the size and position of a window (container) a series of things that are more and easily confusing, here are enumerated and briefly described below:
Property Method Description:
ClientX the horizontal coordinate of the relative
1. JavaScript does not provide a way to directly define a two-dimensional array, but you can define a JavaScript two-dimensional array by using an array of defined arrays: for example, defining a 4x3 two-dimensional array A can take the following
Break and continue statements provide more stringent process control for code execution in a loop. The break statement immediately exits the loop and prevents any code in the loop body from being executed again. The continue statement simply exits
String, numeric, and Boolean values are discrete values (scalar), and if a variable is discrete, then it has only one value at any time.
If you want to use variables to store a set of values, you need to use arrays (array).
An array is a
One, multiplicative operator
1, Multiplication: *
Some special rules for multiplication operators:
If the operands are numeric, the normal multiplication calculates that if the product exceeds the representation range of the ECMAScript value,
One or one-dollar operator
1, self-reduction operator: divided into the front and rear-type;
Front type: ++a;--a;
Rear-mounted type: a++;a--;
Cases:
Copy Code code as follows:
Among them a=i++, equivalent to
Preface: It is also a primer article. There are several very important language features in JavaScript-objects, prototype inheritance, closures. The closures are a new language feature for programmers who use the traditional static language C/S. In
One, Date object
Format: Date Object name =new date ([date parameter])Date parameters: 1. Omitted (most commonly used)2. English-parameter format: month, year [time: seconds]
such as: Today=new Date ("October 1,2008 12:00:00");
3. Numerical
First, create the node:
Nodes are the basis of the DOM structure, and according to the DOM specification, nodes are a broad concept that contains elements, attributes, text, documents, and comments. But in actual development, to dynamically create
1. A simple example
First from a classic error, there are several div on the page, we want to bind them to a onclick method, so we have the following code
Copy Code code as follows:
0 1 2 3
0 1 2 3
Copy
The replace () method replaces some characters in a string with some other characters, or replaces a substring that matches a regular expression.
Syntax: String.Replace (substr/reg,replacestr/function)
The first argument can be a substring of a
The typeof in JavaScript is actually very complex, it can be used to do a lot of things, but at the same time there are a lot of weird performance.
This article enumerates several usages of it, and also points out the existing problems and
ConstructorsNew Object ()
New Object (value)
ParametersvalueAn optional parameter that declares the original value (that is, a number, Boolean, or String) to convert to a numbers object, a Boolean object, or a string object. This object is not
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
Preface
Before you say jquery, first learn about the basics of JavaScript (hereafter referred to as JS) language, for each programming language, the basic knowledge is the same, for variables, functions, conditional statement blocks, circular block,
People who use JavaScript often think of their garbage collection mechanism, and JavaScript does not require developers to manually remove garbage as c,c++ does, and when writing JavaScript programs, developers don't care about memory usage. The
Original: JavaScript, We hardly new Ya--douglas Crockford.
http://yuiblog.com/blog/2006/11/13/javascript-we-hardly-new-ya/
Reference
JavaScript is a prototype based language, but it has a new operator that makes it look
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