JS browser part bring forward and backward refresh functions

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

A file (F), [] the menu command     

1, 〖Open "command     [format]: document.execCommand("open")

[description] with the VB programming WebBrowser control command some similar, you also can use pondering.    

[for example] in<body></body>A join between:    

<a href="#" onclick=document.execCommand("open")>Open</a>     

 

2, 〖Use Notepad to edit "command    

[format]: location.replace("view-source:"+location)

[description] open Notepad, display the Webpage source code in Notepad.    

[for example] in<body></body>A join between:

<a href="#" onclick=location.replace("view-source:"+location)>Use Notepad to edit</a>    

 

3, 〖The save as command     

[format]: document.execCommand("saveAs")    

[description] the Webpage saving to a different directory for the local disk!

[for example] in<body></body>A join between:

<a href="#" onclick=document.execCommand("saveAs")>Save as</a>   

  

4, 〖Achieve the print command    

[format]: document.execCommand("print")

[description] of course, you must install the printer!    

[for example] in<body></body>A join between:

<a href="#" onclick=document.execCommand("print")>Print</a>     

 

5, 〖To achieve close "command     

[format]: window.close();return false    

[description] will close the window.

[for example] in<body></body>A join between:

<a href="#" onclick=window.close();return false)>Close the window</a>

Two, [edit (E)] the menu command     

〖Implementation of all "command    

[format]: document.execCommand("selectAll")    

[description] will all contents in Webpage selection!

[for example] in<body></body>A join between:    

<a href="#" onclick=document.execCommand("selectAll")>Select all</a>   

 

Three, (V)] [see the menu command     

1, 〖The refresh command     

[format]: location.reload (or history.go)(0)    

[description] the browser to open this page.

[for example] in<body></body>A join between:

<a href="#" onclick=location.reload()>Refresh</a>    

Add: < href=" a or #" onclick=history.go; > (0) the refresh</a>     

 

2, 〖Realization of the source file "command    

[format]: location.replace("view-source:"+location)    

[description] see the Webpage source code.    

[for example] in<body></body>A join between:

<a href="#" onclick=location.replace("view-source:"+location)>View the source file</a>      

 

3, 〖Implementation of "command of the full screen display     

[format]: window.open(document.location,"url","fullscreen")    

[description] full screen display this page.    

[for example] in<body></body>A join between:    

<a href="#" onclick=window.open(document.location,"url","fullscreen")>Full screen display</a>   

 

Four, (A)] [of the menu command     

1, 〖Add to Favorites "command     

[format]: window.external.AddFavorite ('url',' "the web site name")    

[description] will this page add to Favorites.    

[for example] in<body></body>A join between:    

<a href="javascript:window.external.AddFavorite('http://oh.jilinfarm.com', 'Personal home page ') " > add to Favorites</a>    

 

2, 〖The organize favorites "command    

[format]: window.external.showBrowserUI("OrganizeFavorites",null)    

[description] open the organize favorites dialog.    

[for example] in<body></body>A join between:    

<a href="#" onclick=window.external.showBrowserUI("OrganizeFavorites",null)>Organize favorites</a>   

 

Five, [(T)] implementation tools menu commands     

〖The Internet command options    

[format]: window.external.showBrowserUI("PrivacySettings",null)    

[description] open the Internet Options dialog box.    

[for example] in<body></body>A join between:    

<a href="#" onclick=window.external.showBrowserUI("PrivacySettings",null)>The Internet option</a>    

 

[six,] in order to achieve the toolbar     

1, 〖Forward "command     

[format]history.go (1) or history.forward()    

[note] the browser opens a page.    

[for example] in<body></body>A join between:

<a href="#" onclick=history.go(1)>Forward</a>    

Or join <a href=" #": onclick=history.forward (>); forward</a>    

 

2, 〖Back and realize "command     

[format]: history.go (-1) or history.back()    

[description] the browser to return to the last page is.    

[for example] in<body></body>A join between:

<a href="#" onclick=history.go(-1)>Back off</a> Keep the form data

Add: < href=" a or #" onclick=history.back; > ()</a> Don't keep the form data

Or <a href=" javaScript:onclick=history.go (-1) > back "</a>

 

3, 〖The refresh command     

[format]: document.reload (or history.go)(0)    

[description] the browser to open this page.    

[for example] in<body></body>A join between:

<a href="#" onclick=location.reload()>Refresh</a>    

Add: < href=" a or #" onclick=history.go; > (0) the refresh</a>   

 

Seven, other command     

〖The timing closing the window "command    

[format]: setTimeout (window.close), close (time)

[description] will close the window.    

[for example] in<body></body>A join between:

<a href="#" onclick=setTimeout(window.close(),3000)>3 seconds to close the window</a>   

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Clyde at March 01, 2014 - 12:40 AM