Print-complete description of webbrowser. execwb

Source: Internet
Author: User

Execwb method of webbrowser component

1. <Object ID = "webbrowser" width = 0 Height = 0 classid = "CLSID: 8856f961-340a-11d0-a96b-00c04fd705a2"> </Object>

2. Call method:
Webbrowser. execwb n1_id, ncmdexecopt, [pvain], [pvaout]

3. parameter description:
(A). n1_id
Olecmdid_open = 1,
Olecmdid_new = 2,
Olecmdid_save = 3,
Olecmdid_saveas = 4,
Olecmdid_savecopyas = 5,
Olecmdid_print = 6,
Olecmdid_printpreview = 7,
Olecmdid_pagesetup = 8,
Olecmdid_spell = 9,
Olecmdid_properties = 10,
Olecmdid_cut = 11,
Olecmdid_copy = 12,
Olecmdid_paste = 13,
Olecmdid_pastespecial = 14,
Olecmdid_undo = 15,
Olecmdid_redo = 16,
Olecmdid_selectall = 17,
Olecmdid_clearselection = 18,
Olecmdid_zoom = 19,
Olecmdid_getzoomrange = 20
Olecmdid_updatecommands = 21
Olecmdid_refresh = 22
Olecmdid_stop = 23
Olecmdid_hidetoolbars = 24
Olecmdid_setprogressmax = 25
Olecmdid_setprogresspos = 26
Olecmdid_setprogresstext = 27
Olecmdid_settitle = 28
Olecmdid_setdownloadstate = 29
Olecmdid_stopdownload = 30
The above keywords can all be found in the menu of the browser. You can see it at a glance ﹗
(B). ncmdexecopt
Olecmdexecopt_dodefault = 0,
Olecmdexecopt_promptuser = 1,
Lecmdexecopt_dontpromptuser = 2,
Olecmdexecopt_showhelp = 3
For this parameter, select 1.

4. Frequently used:
Webbrowser. execwb () Open
Webbrowser. execwb () Close all existing IE Windows and open a new window
Webbrowser. execwb () Save the webpage
Webbrowser. execwb (6, 1) print
Webbrowser. execwb (7,1) print preview
Webbrowser. execwb (8, 1) print page settings
Webbrowser. execwb (10, 1) view page properties
Webbrowser. execwb () seems to be undo, to be confirmed
Select All webbrowser. execwb (17,1)
Webbrowser. execwb (22, 1) Refresh
Webbrowser. execwb () Close form no prompt

5. Example ﹕
(A) Example of calling the "Save as" function of IE ﹕
<Object ID = "webbrowser" width = 0 Height = 0 classid = "CLSID: 8856f961-340a-11d0-a96b-00c04fd705a2"> </Object>
<A href = "javascript: webbrowser. execwb (4, 1);"> Save-storage </a>

(B) modified login Mode
<Object ID = "webbrowser" width = 0 Height = 0 classid = "CLSID: 8856f961-340a-11d0-a96b-00c04fd705a2"> </Object>
<Body onload = "showmodaldialog ('login _ access. ASP ', 0, 'status: No; dialogwidth: 418px; dialogheight: 288px'); document. all. webbrowser. execwb (45, 1); ">

<Object classid = CLSID: 8856f961-340a-11d0-a96b-00c04fd705a2 Height = 0 id = webbrowser width = 0> </Object>
<Input name = button onclick = Document. All. webbrowser. execwb (1,1) type = button value = open>
<Input name = button onclick = Document. All. webbrowser. execwb (2, 1) type = button value = close all>
<Input name = button onclick = Document. All. webbrowser. execwb (4,1) type = button value = Save As>
<Input name = button onclick = Document. All. webbrowser. execwb (6, 1) type = button value = print>
<Input name = button onclick = Document. All. webbrowser. execwb (6, 6) type = button value = print directly>
<Input name = button onclick = Document. All. webbrowser. execwb (7,1) type = button value = print preview>
<Input name = button onclick = Document. All. webbrowser. execwb (8, 1) type = button value = page Settings>
<Input name = button onclick = Document. All. webbrowser. execwb (10, 1) type = button value = attribute>
<Input name = button onclick = Document. All. webbrowser. execwb (17,1) type = button value = select all>
<Input name = button onclick = Document. All. webbrowser. execwb (22, 1) type = button value = Refresh>
<Input name = button onclick = Document. All. webbrowser. execwb (45, 1) type = button value = close>

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.