14 typical JavaScript Codes

Source: Internet
Author: User

Refresh
<Input id = "bn6" type = "button" onclick = "window. Location. Reload ()" value = "refresh"/>

Import favorites
<Input id = "bn7" type = "button" onclick = "window. external. importexportfavorites (true, 'HTTP: // aidd2008.cnblogs.com '); "value =" Import favorites "/>

Export favorites
<Input id = "bn8" type = "button" onclick = "window. external. importexportfavorites (false, 'HTTP: // aidd2008.cnblogs.com '); "value =" Export favorites "/>

Add to favorites
<Input id = "bits" type = "button" onclick = "window. External. AddFavorite (location. href, document. Title)" value = "add to Favorites"/>

Sort favorites
<Input id = "bn10" type = "button" onclick = "window. External. showbrowserui (organizefavorites, null)" value = "favorites"/>

Viewing the source file FF is feasible. IE is not feasible.
<Input id = "bn1" type = "button" onclick = "window. Location = 'view-Source: '+ window. Location. href" value = "View Source File"/>

Language settings
<Input id = "bn12" type = "button" onclick = "window. External. showbrowserui (languagedialog, null)" value = "language Settings"/>

Forward
<Input id = "bn13" type = "Submit" onclick = "history. Go (1)" value = "Forward"/>

Back
<Input id = "bn14" type = "Submit" onclick = "history. Go (-1)" value = ""/>

Open
< Input ID = "Bn1" Type = "Button" Onclick = "Document. All. webbrowser. execwb (1, 1 )" Value = "Open"   />

Save As
input id =" bn2 " type =" button " onclick =" document. all. webbrowser. execwb (4, 1) " value =" Save as " />

Print
input id =" bn3 " type =" button " onclick =" document. all. webbrowser. execwb (6, 1) " value =" print " />

page Settings
input id =" bn4 " type =" button " onclick =" document. all. webbrowser. execwb (8, 1) " value =" page settings " />

attribute
input id =" bn5 " type =" button " onclick =" document. all. webbrowser. execwb (10, 1) " value =" attribute " />

Object id =" webbrowser " classid =" CLSID: 8856f961-340a-11d0-a96b-00c04fd705a2 " height =" 0 " width =" 0 " />

webbrowser. execwb () Open
webbrowser. execwb () Close all existing IE Windows and open a new window
webbrowser. execwb (4, 1) Save the web page
webbrowser. execwb (6, 1) print
webbrowser. execwb (7,1) print and preview
webbrowser. execwb (8, 1) print page Settings
webbrowser. execwb () view page properties
webbrowser. execwb () seems to be canceled and is awaiting confirmation
webbrowser. execwb (17,1) select all
webbrowser. execwb () Refresh
webbrowser. execwb () Close form no prompt
these are only valid for ie5.5 and later versions, for other The browser is not very compatible!

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.