A. JavaScript Basics
1.try...catch uses lowercase letters. Uppercase letters can go wrong.
2.Throw statement
The purpose of the throw declaration is to create a exception (exception). You can use this declaration in conjunction with the
var str= "Hello";
str+= "World";
In fact, the steps that this code performs behind the scenes are as follows:
(1) Create a string that stores "Hello".
(2) Create a string that stores "world".
(3) Create a string that stores the result of the
Getelementbytagnames (Note that the names of the plural) will get some tag elements and then save them in an array in their order. This is very useful, for example, in the Tocscript of the previous chapter, you need to get all the H3 and H4 in the
If you want to do the same, then you need my getelementbytagnames () function.
Copy Code code as follows:
function Createtoc () {
var y = document.createelement (' div ');
y.id = ' Innertoc ';
var a = Y.appendchild
jquery Operations non-aggregate array functions$.trim (value)This function is simple enough to remove any leading or trailing whitespace characters from value. A white space character is any character that matches the \s of a JavaScript regular
The example in this article tells JavaScript to build its own object. Share to everyone for your reference, specific as follows:
For more on JavaScript related content to view the site topics: "JavaScript object-oriented Tutorial",
This example describes the return usage in JavaScript. Share to everyone for your reference, specific as follows:
Return can accept the returned value in the function, provided that there are returns statements in the function.
The following is a
Prototype
1,
Prototype is associated with clones,
That is, when an instance is created, prototype will clone the member to an instance of that class (function).
Detail: The most common of several built-in objects in the prototype, such as: Array
The development of the layer in the practical application of more important, such as floating ads, and so on, I have a brief discussion here.
1. Show or hide the control layer
Both methods are in fact controlled style.
Method One: Control Display
untitled Doc ument cloud-dwelling community
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Adding this string of code to the page also has a search function. Demo effect, please see this
Post instead of form
ReadyState is the progress of the XMLHTTP return data, 0 = load, 1 = uninitialized, 2 = loaded, 3 = run, 4 = complete
Component is installed
IsComponentInstalled ("{6b053a4b-a7ec-4d3d-4567-b8ff8a1a5739}",
1. Apply and call functions on JavaScriptPrototype.js uses a large number of apply and call functions, and not noticing can cause an understanding bias.
Official explanation: A method of applying an object that replaces the current object with
Sometimes, we may need to be like the new Yahoo mailbox, so that some data display blocks can be adapted to the size of the page. The fact is not difficult, but if the simple use of CSS control, often can not fully realize the effect we want, this
First, the principle analysis:
1. How to move?
To move the div to the pointed coordinate point (x,y), its essence is to change both the DIV.style.top and DIV.style.left of the div;
2. How do I see the move?
Because you want to have a move effect
Share how the micro-letters are positioned:
This article mainly explains how to use the micro-letter positioning, how to convert the latitude and longitude of the location to the corresponding latitude and longitude of Baidu map, as well as deal
The JavaScript date.gettime () method returns a numeric value for the specified date, according to the time at which the universal time corresponds. The value returned by the GetTime method is the number of milliseconds since 00:00:00 January 1, 1970
The GetMonth () method of the JavaScript date is the month returned on the specified date by local time. By getting the month returned the value is 0-11;0 corresponds to January, 1 corresponds to February, and so on between the integers.Grammar
The JavaScript date.getminutes () method returns minutes on the specified date at local time. The value returned by getminutes is an integer between 59 and 0.Grammar
Date.getminutes ()
The following are the details of the parameters:
NA
The JavaScript date.getfullyear () method returns the year of the specified date, in local time. The value returned by getFullYear is an absolute number. For the date between 1000 and 9999, getFullYear returns a 4-digit number, such as 2008.Grammar
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