ASP FAQs and Answers (9)

Source: Internet
Author: User
1, open the implementation of the command
[Format]:d Ocument.execcommand ("open")
[description] This and VB and other programming design in the WebBrowser control of the command somewhat similar, we can also be pondering.
[For example] add between <body></body>:
<a href= "#" Onclick=document.execcommand ("open") > Open </a>
2, the use of Notepad edit the implementation of the command
[Format]:location.replace ("View-source:" +location)
[Description] Open Notepad and display the source code for the page in Notepad.
[For example] add between <body></body>:
<a href= "#" Onclick=location.replace ("View-source:" +location) > Use Notepad edit </a>
3, Save as the implementation of the command
[Format]:d ocument.execcommand ("SaveAs")
[Description] Save the page to a different directory on this site!
[For example] add between <body></body>:
<a href= "#" Onclick=document.execcommand ("SaveAs") > Save As </a>
4, the implementation of the Print command
[Format]:d ocument.execcommand ("print")
[Description] Of course, you must install the printer!
[For example] add between <body></body>:
<a href= "#" Onclick=document.execcommand ("print") > Print </a>
5. The implementation of the close command
[Format]:window.close (); return false
[description] Closes this window.
[For example] add between <body></body>:
<a href= "#" Onclick=window.close (); return false) > close this window </a>
Implementation of commands in the "edit (E)" Menu
Implementation of the full selection command
[Format]:d ocument.execcommand ("SelectAll")
[description] will be the selection of the entire content of the page!
[For example] add between <body></body>:
<a href= "#" Onclick=document.execcommand ("SelectAll") > select All </a>
Implementation of commands in the View (V) menu
1, the implementation of the Refresh command
[Format]:location.reload () or history.go (0)
[Description] The browser opens this page again.
[For example] add between <body></body>:

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.