What is the event?
JavaScript and HTML interaction are handled by manipulating events that occur on a page in a user or browser.
When the page loads, this is an event. When the user clicks on a button, clatter, which is an event. Another example
Before JavaScript1.2, the function definition is only allowed at the top level of global code, but 1.2 of JavaScript can be nested functions to define other functions as well.
A function definition that still exists can be circular or without
1, argumentsAn array corresponding to the arguments passed to a function.
In a function body, the identifier arguments references a special property of the arguments object. You can get the parameter values that are passed to the function by number (
I studied the arguments in the JavaScript function a little bit at noon.
Copy Code code as follows:
Which observed the lower arguments.length and the Arguments.callee
First of all, arguments of course only has meaning in the
One page output
1. head file
Copy Code code as follows:
2. Within the page
Copy Code code as follows:
3. External documents
4. Using the innerHTML of page ID
Copy Code code as
1 Creating script blocksProgram code
Copy Code code as follows:
2 Hide Script code
Program code
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Do not
and has always been using the equal sign "= =" has not been used in JS all equal to the symbol "= =". While these two operators only detect the equality of two objects, one performs a type conversion and one type does not convert, all equals the
one, Math.min () and Math.max (), respectively, to return the minimum and maximum values in the parameter
Cases:
Alert (Math.min (1,2,3))//output "1"
Alert (Math.max (1,2,3))//Output "3"
Second, Math.Abs (), return the absolute value of the
The HTML code is as follows:
Copy Code code as follows:
The JavaScript code is as follows: The time display format is: 2011-04-04 Tuesday 12:09:34
Copy Code code as follows:
function StartTime () {
try{
var
[Document Object]This object is a property of the window and frames objects, and is a document that is displayed in a Windows or frame.
Property
Alinkcolor Active link color (ALINK)
Anchor a HTMI anchor point, created using the tag (the property
Copy Code code as follows:
function TT ()
{
Alert (11);
}
var b = TT;
var B1 = TT (); Perform the TT () function function
For a reference to a function, you can assign the function name "tt" directly to a variable, but not the
Lazy load meaning (why to use lazy load)
The biggest impact on the page load speed is the picture, a normal picture can reach several m size, and the code may be only dozens of KB. When the page picture many, the page loading speed is slow, several
Causes the database to run the task to have the error (the task calculates the state according to the date, because the data quantity is bigger, all makes the task to run at night), in order to avoid this kind of mistake again, therefore added a
We've all seen a malicious ad in a webpage, you shut it out again! Why, JS to tell you
Html
can not be closed to the bomb frame, can't kill the cockroach!
call
Express message
Css
*{margin:
Addition Assignment operator (+ =). Adds a variable value to an expression value, and assigns it to the variable.
In writing javascrpt often use, to tell the truth I did not quite understand before. Read a lot of code feeling is because a variable
Two days ago found a good site on the Internet, is used to do the data collection (http://wolf.360doc.com).
This site provides such a function, you can directly put your selected text collection, at that time feel very magical. Later, it was
When you use an IFRAME on the page, you generally do not want the IFRAME to display unsightly scroll bars so that the contents of the IFRAME and the contents of the main page are seamless. At this point you will set the scrolling= "no" attribute.
In the use of cookies, we found a problem: if the contents of a cookie are written in Chinese (such as a user's salutation), read it completely correctly with a server-side program (such as ASP or PHP). But using a normal JavaScript or VBScript read
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