This method creates an HTML hypertext link that requests another URL.Grammar
String.link (Hrefname)
The following are the details of the parameters:
Hrefname: Any string specifies an HREF tag; It should be a valid URL
return value:
The prototype property can add properties and methods to any object (number, Boolean, String, date, and so on).
Note: The prototype (PROTOTYPE) is a global property that can be used in almost all objects.Grammar
Object.prototype.name =
You can use multiple if ... else if statements, such as the previous section, to perform multiple branches. However, this is not always the best solution, especially when all branches depend on the value of a single variable.
Starting with
The 18th Chapter Advanced Technique
1. Advanced function
1.1 Constructor for scope security
① calls a constructor directly without applying the new operator, it maps to the Global object window because of the late binding of the This object, causing
1. Built-in objects in JavaScript
JavaScript, in addition to its own built-in objects, such as the following we are familiar with the object:
Array
Date
Math
string
RegExp
•......
Each object has its own attributes and methods, such as our frequent
A detailed look at the attachment example, or write a relatively simple.
1. Functions on Cookies:
Copy Code code as follows:
/**
* Cookie Operation tool.
* Use Method: Save value: Cookietool (' name ', ' 1 ', {expires:7})//= save a
I. Data typesJavaScript is a weak type of scripting language that has 6 data types and is divided into basic data types, special data types, and composite data types.
1. Basic data type: Numeric type, String type, Boolean type
2. Special Data type:
All modern browsers use the built-in support for JavaScript. Many times, you may need to enable or disable this support manually.
This tutorial will let you know how to enable and disable JavaScript support in your browser: IE browser, Firefox and
Introduction to a form
In HTML, a form is represented by a element, whereas in JavaScript the form corresponds to a htmlformelement type;
Htmlformelement inherits HtmlElement, so it has the default attributes that HTML elements have, and is
form:http://www.webreference.com/programming/javascript/mk/
Author:mark Kahn
Many developers have a large library of JavaScript code at their fingertips that they developed, their collegues developed , or that they ' ve pieced together from scripts
The DOM itself has many types, which are described in the previous chapter, such as element types: The elements node, or the text type;
One DOM type
Type name DescriptionNode represents a uniform interface for all types of values, IE is not
The DOM (Document Object model), which is an API for HTML and XML documents (the application interface);
The DOM depicts a hierarchical node tree in which developers can add/remove and modify portions of the page;
Introduction to a DOM
D
String String Object
1. Introduce
String object that operates on strings, such as intercepting a substring, finding a string/character, converting case, and so on.
2. How to define
2.1 New String (value) constructor: Returns a String object that
Introduced
This article is mainly about creating objects in the next chapter of the pattern, using a variety of techniques can greatly avoid errors or can write very concise code.
Mode 6: Functional grammar sugar
function syntax sugar is an
Introduced
Any programming uses code reuse, otherwise every time you develop a new program or write a new feature, you need to write new words, that's a good break, but the code reuse is also bad, the next two articles we will discuss the code
Introduced
Combined mode (composite) combines objects into a tree structure to represent a "partial-whole" hierarchy, which makes the user consistent in the use of individual objects and composite objects.
The common scene has the control
Inserted only before, after one or more lines, and at the end of program input
That means you can only omit a semicolon in one line, a block of code, and the end of a program.
Which means you can write the following code
Copy Code code as
Before writing a piece of nonsense: because the older version some browsers do not support JavaScript script, encountered script node, as the normal content output, so sometimes in order to make version compatible, will be in the script node content
First, things begin with a question
simple
;
a2.name=xxx; A1.name will become
str2=str1;
str2=xxx; STR1 won't change.
Welcome to think nonsense too many students go straight to the end to see "technical flow explanation" ha, then we
One, String object
A string object is used to process text (strings).
Second, the constructor
New String (value)//constructorfunction String (value)//Conversion functions
Third, the property
Length The number of characters in the string
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