JavaScript Introduction:
JavaScript is a scripting language that belongs to the web!
JavaScript is used by millions of of pages to improve design, validate forms, detect browsers, create cookies, and apply more.
JavaScript is the most popular
JavaScript is powerful, but a problem is that it can not contain other JS files, and other non-scripting languages are basically have this function, have to feel a little regret. Shang, increasingly found that not dynamic import files will
Note: Haven't written for a long time, today I wrote a copy of the article in the company intranet, out of the show, just turned to web development, so began to learn javascript!
Before introducing namespaces, a problem for developers is how to
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
JavaScript is a prototype based programming language, which differs greatly from our usual class based programming, and I enumerate the important points as follows:
1. The function is a class object, which means that the function has the same
Very simply, "add" two strings with a "+":
var longstring = "One Piece" + "plus one more piece.";
To accumulate more than one string as a string, you can also use the "+ =" Operator:
var result = "";
result =
Some WEB sites store information in small text files on your hard disk, which are called cookies. "--msie help. In general, cookies are CGI or similar, created in a way that is more than HTML advanced files, programs, and so on, but JavaScript also
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.
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
We look at:
oele= DOCUMENT.ALL.AAA//There is a AAA object here, but we do not know how long it is now, so there is no way to operate on it. Therefore, we have to do the process of judging length first.
if (oele.length) {}else{};
In both cases, the
Initial Contact:
After the initial exposure to JavaScript injection vulnerabilities, if you do not carefully analyze the mechanism of this vulnerability and extract a pattern of its occurrence, you will not be able to quickly discover all the
Javascript Implementation Magnifier Effect
When we do the task today, there is a task is to achieve the electronic business site commonly used Magnifier effect, similar to such a magnifying glass effect, before and did not do this magnifying glass
First, the principle analysis
1.1 How to let the div element move up?
The essence of the movement is to change the position of the div, that is, to change its left and top values;
2.2 How does the DIV element move when it is on the specified
These two days with virtual machine installation system, ready to use virtual machine to separate development environment and database, the idea is as follows:
1. Development environment for host
2.Guest is a database server, each server is a
Author: Jegg
At the end of the year, many companies are busy with the annual meeting, there will be some lottery activities, the following program is written in JavaScript with a simple lottery system to share with you.
This code borrows some of the
Objective:
Recently, the company's app to speed up the development of the efficiency of selected part of the use of H5 development, from the current market for most of the app, roughly divided into native app, Web app, Hybrid app three ways,
I like the strategy design pattern. I try to use it as much as I can. In essence, the strategy model uses delegates to decouple the algorithm classes that use them.
There are several advantages to doing so. He can prevent large conditional
As you may have noticed, more and more Web applications have become more complex in recent times, with the focus shifting slowly from the server to the client. Is this a normal trend? I do not know. The discussion of support and opponents is like
This method returns the square root of a number. If the value of the number is negative, the root is returned to Nan.Grammar
MATH.SQRT (x);
The following are the details of the parameters:
X: A number
return value:
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