1. Create a form
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
The order in which we created the elements and the text node:
We created the TABLE element.
Next, we created the TBODY
Event Handling Overview
Event handling is an important part of object-oriented programming, and without event handling, the program becomes very dead and inflexible. The process of event handling can be represented by an event-initiating an event
There are two kinds of event bindings: Traditional event binding (inline model, script model), and modern event binding (DOM2 level model). Modern event bindings provide more powerful and convenient functionality on traditional bindings.
A problem
Learning to parse the JSON string today, using an eval () method, why do I need parentheses when parsing a string? I can't touch my head. The original JavaScript {} statement block is ambiguous, without parentheses there will be errors,
Group
The following regular expressions can match kidkidkid:
/kidkidkid/
And another more elegant way to do this is:
/(Kid) {3}/
Here a small whole of the parentheses parcel is called grouping.
Candidate
In a group,
Learning causes
Once in a stroll v2ex, encountered such a post.Mathematics completely back to the teacher, want to learn some basic mathematics, probably high school degree, what book recommended?Post the landlord University does not have a high
AddEventListener () methodInstanceClick the button to trigger the listener event when the user clicks:
document.getElementById ("Mybtn"). AddEventListener ("click", Displaydate);
The AddEventListener () method is used to add an event
[2007-04-11 14:31:50 | Author:never-online]
First of all, please download jscript.chm this manual, no matter novice veteran, there is a manual is unavoidable, especially for beginners, if you do not Flip Rhino book, then this manual will be your
Copy Code code as follows:
The FileSize attribute of JavaScript and IMG itself under IE is applied. In addition, IMG has several other attributes, such as Filecreateddate, Filemodifieddate, FileSize, fileupdateddate, filters, we can
A JavaScript variable can be either a local variable or a global variable.Private variables can be used in closures.Global VariablesA function can access a variable that is defined internally by a function, such as:Instance
function
Although JavaScript is a weakly typed language, it also has several data types of its own, namely number, String, Boolean, Object, udefined, and Null. Where object belongs to a complex data type, object is made up of unordered key-value pairs. The
Method definitionCall Method:Syntax: Call ([thisobj[,arg1[, arg2[, [,. argn]]]]Definition: Invokes one method of an object, replacing the current object with another object.DescriptionThe call method can be used to invoke a method instead of another
Hoisting mechanism
The JavaScript variable declaration has a hoisting mechanism that, when executed, promotes the declaration of all variables to the front of the current scope.
Read a piece of code first
var v = "Hello";
(function () {
When it comes to setinterval, you have to mention settimeout, both of which are used to perform a function on a regular basis, the difference being that settimeout is executed only once, and setinterval can be executed continuously, typically as
Requirejs is an effective way to improve the speed and quality of your JavaScript code, and it also makes your code easier to read and maintain.
In this article, I'll introduce you to Requirejs and how you should use it. We discuss the introduction
1. About this object
Copy Code code as follows:
View Plaincopy to Clipboardprint?
var obj1=new Object ();
var obj2=new Object ();
Add attribute p to all two objects, equal to 1 and 2 respectively
Obj1.p=1;
obj2.p=2;
1, create the node.
CreateElement ():
var a = document.createelement ("P");
It creates an element node, so NodeType equals 1.
A.nodename will return p;
Note that the new element node created by the createelement () method is not automatically added
Speaking directly from the method:
1, delete the node. RemoveChild ():
a
b
c
If you do not know what the parent node of the node you want to delete is? You can use the ParentNode property.
Like what:
a
b
c
2, replace the node.
JScript is a case-sensitive language.
The first character must be an ASCII letter (either uppercase or lowercase), or an underscore (_). Note that the first character cannot be a number.
Subsequent characters must be letters, numbers, or
String.Replace () Introduction
Grammar:
Copy Code code as follows:
String.Replace (RegExp, replacement)
RegExp: The regular expression for which you want to perform the substitution operation. If a string is passed in, it 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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service