1. URL is the address of the window to be opened name is the name of a new window, and you can communicate with the new window through name features are strings divided with "," such as "height:width:200", whose content is various properties of a new window
2. window provides a display scheme for modal dialog: showModalDialog(paramparam// Parameter 1: Used to specify the URL that provides the HTML content of the dialog box Parameter 2: It can be an arbitrary value. This value can be accessed through the value of the window.dialogArguments property in the script in the dialog box. Parameter 3: It is a non-standard list, containing name=value pairs separated by semicolons. If this parameter is provided, you can configure the dimensions and other properties of the dialog box, and use dialogwidth and dialogheight to Set the size of the dialog window, use "resizable=yes" to allow the user to change the window size
3. varnum=076;//The octal system represented by it starts with 0. If the following value exceeds the range of 8, such as: 079, etc., then parse it in decimal.
4. parent.appendChild(child)// method can insert a child element into the parent element Including two parts of work: 1-Insert the text node into
Under the node, para.appendChild(txt);2-
Insert nodes into other nodes
5. You can create an editable area element in HTML. Method:
6、
7. The content of many nodes is not in their value, such as:
Helloworld
, you can use vartext=document.getElementById("desc").firstChild.nodeValue; The value obtained by text here is: HelloWorld8. Right shift is divided into two types: signed right shift and unsigned right shift:
9. JavaScript has no block-level scope, as shown in the following example:
10. Signed right shift: >> only move data bits, not sign bits: -64>>5---->-2 Unsigned right: >>> Everything needs to move, so the negative number will become a positive number after it moves, and this positive number is generally very large
11. There are three types of objects: user-defined-object (user-defined object), native-object (built-in object) and host-object (host object) where native-object is an object built into javascript, such as Array, Math, Date, etc., while host-object is an object provided by the browser.
12. NaN->NotaNumber;//Non-number, NaN is not equal to any value, so it is self-contained; the way to determine whether a value can be converted into a numeric value: isNaN(*), * is the data to be converted
13. If the conversion is performed using parseInt() method, it is different from 7 (for strings). The basic principle is as follows:
14. In JavaScript, 32-bit data represent a number, shift left <<不会改变符号位,例:2<<5;-->64 i.e.: 10->1000000不会改变符号位,例:2<<5;-->
15. slice() returns a fragment of the specified array. You can write two parameters or one parameter. One parameter represents starting from the current position of the parameter and ending. The two parameters refer to the first parameter to the second parameter. Parameters - specifies the last element, that is, the penultimate element, and -3 specifies the penultimate element
16. window.location.href// can get the URL address loaded by the current document, window.location.search// can get the content after the ? characters in the current document, which is generally used for Detect the situation where key-value pairs, name=value
17. JavaScript has 5 basic data types, Undefined, Null, Boolean, Number and String; and a complex data type: Object
18. Open a new window in JavaScript with window.open(url, name, features). These three parameters are all optional, as follows:
19. The important attributes of Node nodes are explained as follows: parentNode---->To the parent node of the node, if it is a document object, its parent node is null childNodes---->Read-only class array node, it is a child node of that node firstChild and lastChild, the first child and the last child of the node nextSibling, previousSibling, the previous and next ones of the brother nodes of this node nodeType---->The node type of this node is to return a value, 9 represents the document node, 1 represents the Element node, 3 represents the Text node, 8 represents the Comment node, and 11 represents the DocumentFragment node nodeValue----->text node or Comment node text content nodeName---->The label name of the element, expressed in capital form
20. msg="hello";//If you do not apply to var, you can declare a global variable. However, because this variable is global, it can easily cause some problems with other calls, so it is not recommended.
21. Array operation:
22. The case in the switch statement is very powerful, it can be a numeric value, a string or even an expression
23. varmsg;//Declare a variable. Before assigning a value to this variable, the variable is named: undefined
24. There is no parameter added in function() in javascript, for it, it is actually received by arguments[]
25. Setting the variable value to null can dereference this variable. JavaScript's garbage collector will recycle it when it is run next time.
26. Screen object can obtain information about the size of the window display and the number of available colors.
27. The instanceof statement is used to determine whether it belongs to a certain data type or an object: personinstanceofObject//The variable person is Object? If so, it returns true.
28. Reference types are similar to classes, but not the same thing! There are two ways to create a reference type:
29. The toString() method generally does not need to use parameters. true->"true" is converted according to strings, but when converted from numbers to String, parameters can be added to set the partition.
30. Whether it is setTimeout or setInterval to setTimeout, it is not executed immediately, but put this method into the queue and wait for the previous state to be executed before execution.
31. SetTimeout()//Two parameters, one is the callback function, and the other is the callback time, indicating how many milliseconds it is to call this callback function, such as:
32. When converting to Number, false->0;true->1;""->0;"00022"->22;"helloworld"->NaN; Note: The Number() method is used
33. getElementsByClassName(); can get the child nodes of the same className under the parent node
34. The navigator attribute of window can contain multiple attributes: appName---->The full name of the web browsing area appVersion----->Browser Manufacturer and Version userAgent---->usually contains appVersion and other information, without a certain format platformfrom----->Operation system that runs the browser, it is possible to even make the hardware onLine---->If this property exists, it means whether the current browser is connected to the network. geolocation----->Interface used to determine user geolocation information
35. Parses the first non-space character of String. If it is a space, skip it. If it is a non-number or a negative sign, it will directly return to NaN; Continue to parse the contiguous characters until they encounter non-numbers or parsing is completed, and return the parsed content; If the non-space characters parsed to the string start with 0x and add hexadecimal characters after it will be converted to hexadecimal. If it starts with 0 and adds english characters after it will be converted to english;
36. Due to historical reasons, only