Reprint: refresh the current page using jquery and other js accumulation of knowledge

Reprinted: https: //www.cnblogs.com/heguihui/p/10505949.html

How to use jquery to refresh the current page

Here are the full page refresh method: sometimes might use

window.location.reload () to refresh the current page.

parent.location.reload () to refresh the parent object (for framework)

opener.location.reload () to refresh the parent window object (for a single window open)

top.location.reload () to refresh the top of the object (for multi-windowing)

Here then are some basic javascript functions

1.document.write ( ""); the output statement 
2.js is annotated // 
3. conventional html document order is: document-> html -> (head, body) 
4. a browser window dom sequence is: window -> (Navigator, Screen, History, LOCATION, Document) 
5. the name and value obtained in the form of elements: document.getelementbyid ( "id number of elements in the form") .name (or value) 
. 6. a turn lowercase uppercase JS: document.getElementById ( "Output") value = document.getElementById ( "INPUT") value.touppercase ();. 
7.js in value types: string, number, boolean, null , object , function 
8.js the character is converted into numeric: parseint (), parsefloat () 
number is converted into character 9.js :( "" + variable) 
take the string length is :( 10.js length) 
11.js two characters in connection with the + sign. 
12.js in comparison operators are: == equal to, not equal to =,>,> =, <<=!. 
13.js variable declarations use: var to declare 
Analyzing the sentence structure 14.js: if (condition) {} else  {}
15.js the cyclic structure: for ([expression The Initial]; [for condition Condition]; [expression The UPADTE]) {} Inside Loop 
16. A command cycle is aborted: break 
function definition 17.js in: function functionname ([parameter ], ...) {Statement [S]} 
. 18. a plurality of form sheet that appears when a file can document.forms 0], document.forms [1] instead of [. 
19. window: open window window.open ( ), closing a window: window.close (), the window itself: self 
setting bar 20. status: window.status = "character"; 
21. a message appears: window.alert ( "characters"); 
22. a confirmation box: window.confirm (); 
:; 23. a pop-up box input prompt window.prompt () 
window.location.href = "URL": 24. a link specifies the current position of the display 
number 25. form remove all forms of : document.forms.length 
26. a document output stream off: document.close (); 
27. a connector string added: + = 
28 creates a document element: document.createElement (), document.createTextNode () 
29. the obtained element method: document.getelementbyid () 
49. The reference to a document-style JS: <Script of the type = "text / JavaScript" src = "aaa.js"> </ Script> 
50. The designated html does not support script browsers display: <noscript> </ noscript > 
51. when there when hyperlinks and onclick event, the old version of the browser steering a.html, otherwise turn b.html cases:. <a href = "a.html " onclick = "location.href = 'b. HTML '; return to false "> dfsadf </a> 
52.js built object has: array, boolean, date, error , evalerror, function, math, number, object, rangeerror, referenceerror, regexp, string, syntaxerror, typeerror , urierror 53.js the wrap: / n- 
54. window to full screen size: <script> function fullscreen () {this.moveto (0,0); this.outerwidth = screen.availwidth; this.outerheight = screen.availheight; Fullscreen window.maximize =}; </ Script> 
55.js representative of all elements in all of the lower layer

56.js focus in order: ( "form elements") .tabindex = 1 document.getelementbyid 
value is a value 57.innerhtml form element: such as how are you, the innerhtml value is: how are you

58.innertext value as above, except that such marking does not appear to em. 
Whether 59.contenteditable element may be provided may be modified, whether modified isContentEditable return state. 
60.isdisabled determined whether the prohibition state. setting disabled state prohibiting 
61.length acquired length, returns the integer value 
62.addbehavior () a file that is an external function call which js extension .htc 
63.window.focus () so that the current in the window until all windows. 
64.blur () means loses focus and focus () opposite.. 
65.select () means the element is selected. 
66. A text box prevents the user input text: the onfocus = "this.blur ()" 
67. remove the the number of elements that appear in the page:. document.all.tags ( "div (html or other marker)") length 
68.js output in the form divided into two types: modal and modeless .window.showmodaldialog ( ), window.showmodeless () 
set 69. the status bar text: window.status = 'text', the default status bar text settings: window.defaultstatus = 'text.'; 
70. Add to favorites: external.addfavorite ( "http://www.google.com", "google")  ;
encountered in the script 71.js When do nothing wrong: window.onerror = donothing; specified error handler syntax is: window.onerror = handleerror; 
72.js specified parent window currently open:. Window.opener, support multiple opener.opener ... continue 
73.js of self refers to the current window 
74.js in the status bar display content: window.status = "content" 
75.js the top refers to the top-level frameset framework 
76.js in to close the current window: window.close (); 
77.js whether the proposed confirmation box: if (confirm ( "are you sure ")) {alert ("  ok ");} else {alert (" not ok? ");}
window 78.js redirection of: window.navigate (" http://www.google.com ") ; 
79.js print: window.print () 
prompts the box 80.js: window.prompt ( "Message", "defaultreply"); 
81.js scroll bar in the window: window.scroll (x, Y) 
82.js scroll to the position of the window: window.scrollby 
83.js set the time interval: setinterval ( "expr", msecdelay ) or setinterval (funcref, msecdelay) or setTimeout 
84.js modal displayed ie4 + line, not in the nn: showmodaldialog ( "url" [,  arguments] [, features]);
85.js handle in use before exiting: verifyclose function () {event.returnValue = "Really WE and Hope you Will you like Stay longer.";}} = Window.onbeforeunload verifyclose; 
86. When the form first file handle to use when calling: the onload () 
87. the file handle when the form is closed call: onunload () 
88.window.location attributes: protocol (http :), hostname ( www.example.com), port ( 80), host (www.example.com:80), pathname ( "/ a / a.html"), hash ( "# giantgizmo", refers to a jump to the anchors), href (all information) 
89 .window.location.reload () to refresh the current page. 
89-1.parent.location.reload () to refresh the parent object (a frame) 
89-2.opener.location.reload () to refresh the parent window object (for single open window) 
89-3.top.location.reload () to refresh the top of the object (for multi-windowing) 
90.window.history.back () Back, window.history.forward () return Next , window.history.go (return to the first few pages, you can also use the visited url) 
91.document.write () does not change the output line, document.writeln () line feed output 
92.document.body.nowrap = true; wrap to prevent the link text. 
93. .charAt variable name (of several), take the first few characters of the variable. 
94. "ABC" .charcodeat (of several) returns the first few characters ascii code value. 
95. the string concatenation: string.concat (string2), or connection = + 
96. .indexOf variable ( "characters", the start position), returns the first occurrence position (counting from 0) 
the position of the last 97.string.lastindexof (searchstring [, startindex]) appears. 
98.string.match (regexpression), determines whether the character matches. 
99.string.replace (regexpression, ReplaceString) replace existing string. 
100.string.split (separator) returns an array stored value. 
101.string.substr (Start [, length]) taken from the first string of several to a specified length. 
102.string.tolowercase () so that all lowercase string. 
103.string.touppercase () so that all uppercase characters. 
104.parseint (string [, the radix (binary behalf)]) cast to integer. 
105.parsefloat (string [, radix]) cast to float. 
106.isnan (variable): testing whether the numeric 
107. the keyword defined constants: const, defined Key variables: var

Guess you like

Origin www.cnblogs.com/lirenhe/p/11505915.html