Add:
Carriage return character \ r and line break \ n the difference:\ r equals Enter, which is the difference between a paragraph and a paragraph,
\ n equals Shift+enter, is the distance between rows and rows, smaller than
several window Operation Method:
1. Get the current window size and print:
var height=window.innerheight;var width = window.innerwidth;
document.write ("<br/>" + "height" +height+ ", width" +width);
2. Open the window, close the current window
window.open ("http://baidu.com");
Window.close ();
3. Move the current window to a location (x, y)
Window.moveto (200,200);
4. Change the size of the current window (width,height)
Window.resizeto (1100,1100);
5. Get the current page address
document.write (LOCATION.HREF);
6, "History" page forward (forward to the previous history, equivalent to "→"), back (back to the previous history, equivalent to "←")
<!--backwards use the. Back method setting in another Web page to--><input type= "button" onclick= "A ()" value = "point me forward"/>
function A ()
{
Window.history.forward ()/* Go ahead to the previous history */
}
*navigator Visitor's browser information
Alert: Warning Box confirm: Confirmation box prompt: Prompt box
Basic syntax: Data type (string, Decimal, Integer, Boolean, time) Var,
var s = "3.14"; var n = parsefloat (s);; s + = 5;
var d = parseint (s);
IsNaN (String): A string that determines if it is a digital shape;-false; not-true.
Operators: Four categories
An expression:
Statements: three major classes (sequential, branching, looping)
Branch: if () {}; If...else ...; If...else if...else If ... else;if nested
Cycle: exhaustive, iterative; four elements (initial conditions, cyclic conditions, loop bodies, state changes):
Array; var a = new Array ()
Functions: Four elements (name, input, return, processing)
function Show ()
{
}
Second, Dom operation: Tree
Window Object--browser windows
Window.location: Address bar
Window.history: Access History
Window.status: Status bar
Window.document: Focus!
Dom manipulation of JavaScript (2)