There is a arguments in the function default: he represents the parameter that the function passes in when it executes
Arguments: arguments, actual parameters
Arguments: Variable parameters refer to the number of arguments that are not
Async Property
The Action Async property indicates whether asynchronous downloads are allowed.Basic grammar boolvalue = Xmldocument.async; Xmldocument.async = Boolvalue;Indicates that the Boolean value is Erasable (read/write), True if the
1. As a function call, refers to the global objectIf we define the following functions:function f () {Console.log (this);}It is then invoked as a normal object, that is, f (), at which point this refers to the Global object window.2. A method call
One: What is the monomer mode:What: The code is organized into a logical unit in which the code is accessed through a single variable. As long as there is an instance of the monomer object, you can be sure that all of your code uses the same global
Function argument Small example one:
FnA (1,2);FnA (2,3);function FnA (a,b){alert (A+B);}
Function argument Small instance one:
Css:body,ul{margin:0;padding:0;}li{List-style:none;}. box{width:200px; margin:20px Auto;. box ul{height:30px;Box
1, onbeforeunload Event:Description: Currently the three major browsers Firefox and IE support the onbeforeunload event, Opera has not yet supported.Usage:Object.onbeforeunload = HandlerDescribe:When the event is triggered, a confirmation and
Labjs is a small JavaScript tool used to load JavaScript files as needed, by using the tool to enhance the performance of the page, to avoid loading JavaScript files that are not needed, and to implement dynamic parallel loading of script files. and
parseURL function
This function creates a new anchor element and uses locationProperties (inherent) to get the desired URL data. Some StringOperations are used (to normalize results across).function parseURL (URL) {var a = document.createelement ('
JavaScript is a very flexible language, and the This keyword is flexible, but because of its flexibility, it is doomed to be difficult to use.
I used this when I would feel uneasy, always worried that it does not know how to point to another place.
The code is as follows
Copy Code
ShowTime ();function ShowTime (){var today = new Date ();Alert ("The time is:" + today.tostring ());SetTimeout ("ShowTime ()", 5000);}
Once this function is called, the time is displayed
Definitions and usageThe eval () function computes a string and executes the JavaScript code in it.
Grammareval (string) parameter descriptionString required. The string to evaluate, which contains the JAVASCRIPT expression to evaluate or the
What is an objectsimply put, the object in the programming language is the simplification of things in the real world. For example, we are one object, but it is difficult for a programming language to fully describe a complex object. So we have to
Principle:
Get the page source (document.referrer) when the page is loaded, analyze the search engine keyword, then get all the elements on the page, recursive query contains search keywords, if so, create a SPAN element, and apply the keyword
To print the contents of an array:Code:--------------------------------------------------------------------------------
The code is as follows
Copy Code
function Printelt (element, index, array) {Document.writeln ("[" +
Verify password: Can only enter 6-20 letters, numbers, underscoresThe code is as follows:
function ispasswd (s)
{
var patrn=/^ (W) {6,20}$/;
if (!patrn.exec (s)) return false
return True
}
Check ordinary telephone, fax number: You can "+"
Web effects useragent Get user Browser type
var useragent = navigator.userAgent.toLowerCase ();
useragent property syntaxNavigator.useragent;UserAgent Property Description
Attribute descriptionappCodeName Gets the code name of the browser.
If there are spaces or other delimiters in the string, you can split the Split method, return an array, and
The number of years in the array is passed as a parameter to the new date () to generate the date type;If there is no special separator, you
Web page special effects array [] {} array operation detailed
JS does not have an array of character indices except numbersOf course! Can do that when the results are not what you thinkSuch as:var p = new Array ();
P[0] = ' first value ';
P[1] = '
Try...catch can test errors in your code. The try section contains the code that needs to be run, and the catch part contains the code that runs when the error occurs.There are two ways to catch errors in a Web page:Use the Try...catch statement.
Because all blogs have been revised to PJAX (pushState + ajax ). Therefore, similar to works and other lists are read using interfaces. The time returned by the backend is a MySQL timestamp and cannot be used directly. Therefore, you need to format
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