Effect Chart:
At the beginning did not take into account the Qing 0 and backspace two functions, Xi Hee, and then add the overall and traditional calculator than a little flaw.
Code:
js simple Calculator 1 2 3 + 4 5 6 - 7 8
This article introduces the JavaScript implementation of the list of linked list insertion and list merge sort, the merge sort of the list is to merge the sort of each part, then merges together.
1. Linked list
1.1 Storage representation of a
Includes Stu.hta ( HTML application);Stu.xmlNote that the following HTML code must be saved as an HTA or it will be prompted with no permissions when you manipulate the XML file (add-!!) The file stu.hta code is as follows:
Copy Code code as
To learn JavaScript well, there are several basic concepts to be clear: prototype,executing,context,closure.
Prototype
In the JavaScript language, you typically use prototype to implement OO. Here, we do not too much discussion of the OO
The last few sections talk about JavaScript-oriented namespaces, JavaScript-oriented JavaScript classes, and JavaScript-oriented private members and public members, so you can look at the above and continue to look down.
If I were to define this:
1, isprototypeof
isPrototypeOf is used to determine whether the specified object Object1 exists in a prototype chain of another object Object2, returns True, or false.
The format is as follows:
Object1.isprototypeof (OBJECT2);
Object1 is an example
First: JSON mode/object Direct quantity
Format:
var object name = {
Variable 1: The value of the variable 1,
Variable 1: The value of the variable 1,
......,
function 1:function () {
function body
},
function 2:function () {
function body
}//note:
can achieve uniform, seamless, plus links and other cosmetic effects, this code is to achieve this function, so that the text from right to right to smooth scrolling, scrolling width, height, speed can be set.
js text Left Movement var
Regular expression parsing in JavaScriptThe regular expression (regular expression) object contains a regular expression pattern. It has attributes (properties) and methods (methods) that match or replace a particular character (or character set) in
Introduction to JavaScript arrays
Arrays in JavaScript are different from arrays in other languages, mainly in:
The items stored in an array can be of different types of data
The size of the array is dynamic and can be changed dynamically when
Grammar
Object Instanceof Constructor
ParametersObjectThe object to be instrumented.Constructor:A constructor
Describe:The instanceof operator is used to detect whether the Constructor.prototype exists on the prototype chain of
In the JavaScript world, everything is an object.
However, some objects are not quite the same as other objects. To distinguish the type of an object, we use the typeof operator to get the type of the object, which always returns a string:
JavaScript has been able to simulate object-oriented encapsulation and inheritance, but unfortunately JavaScript's support for polymorphic features is very weak! Other object-oriented language polymorphism is generally implemented by method overload
We see how straightforward the concept of inheritance here is, "copy the prototype of a class to another class", OK, code is cheap, look at the codes:
function Class1 () {}
function Class2 () {}
Class2.prototype =
Note: The implementation of the Jclass in this chapter refers to the practice of simple JavaScript inheritance .
First, let's look at the examples that are presented in the first chapter:
function person (name) {
THIS.name =
Problem description
Common site layout, the top of a navigation bar, we assume that this page has a total of four columns: respectively A, B, C, D, we click a, anchor jump to a column, while the top of the a button highlighted; Click b, anchor to
Crir = {
Init:function () {
Arrlabels = document.getelementsbytagname (' label ');
Searchlabels:
for (var i=0; iGet the "input" element based on the ' for attribute ' of the label tag
if (Arrlabels[i].getattributenode (' for ") &&
Parameters:(1) objNecessary. The name of the variable to which the Object object is assigned.(2) valueOptional. Any of the JavaScript primitive data types (numbers, Boolean values, or strings). If the value is an object, the returned object is
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.