天天看點

WebBrowser.ExecWB的完整執行個體,列印頁面、頁面設定、列印預覽、另存為、屬性等

<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>

<input name=Button .Click=document.all.WebBrowser.ExecWB(1,1) type=button value=??寮?>

<input name=Button .Click=document.all.WebBrowser.ExecWB(2,1) type=button value=?抽??????>

<input name=Button .Click=document.all.WebBrowser.ExecWB(4,1) type=button value=????涓?gt;

<input name=Button .Click=document.all.WebBrowser.ExecWB(6,1) type=button value=????gt;

<input name=Button .Click=document.all.WebBrowser.ExecWB(6,6) type=button value=?存?ユ????gt;

<input name=Button .Click=document.all.WebBrowser.ExecWB(7,1) type=button value=???伴?瑙?>

<input name=Button .Click=document.all.WebBrowser.ExecWB(8,1) type=button value=椤甸?㈣?劇疆>

<input name=Button .Click=document.all.WebBrowser.ExecWB(10,1) type=button value=灞???gt;

<input name=Button .Click=document.all.WebBrowser.ExecWB(17,1) type=button value=?ㄩ??>

<input name=Button .Click=document.all.WebBrowser.ExecWB(22,1) type=button value=?鋒??gt;

<input name=Button .Click=document.all.WebBrowser.ExecWB(45,1) type=button value=?抽??>

WebBrowser缁?浠剁??execWB?規? ? 1. <object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object> ? 2. 璋??ㄦ?規?: WebBrowser.ExecWB nCmdID, nCmdExecOpt, [pvaIn], [pvaOut] ? 3. ???拌?存??: (a).nCmdID 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 涓??㈢???抽??璇??藉??浠ュ?ㄦ?瑙??ㄧ?????????㈡?懼?闆?瑰?????椤癸?澶у?朵???灏辨???界??锕? (b).nCmdExecOpt OLECMDEXECOPT_DODEFAULT = 0, OLECMDEXECOPT_PROMPTUSER = 1, LECMDEXECOPT_DONTPROMPTUSER = 2, OLECMDEXECOPT_SHOWHELP = 3 瀵逛?杩?涓????幫?涓????ヨ?達???1灏卞??浠ヤ??? ? 4.甯哥?? WebBrowser.ExecWB(1,1) ??寮? WebBrowser.ExecWB(2,1) ?抽???闆?ㄦ??????IE绐??o?骞舵??寮?涓?涓??扮???? WebBrowser.ExecWB(4,1) 淇?瀛?缃?椤? WebBrowser.ExecWB(6,1) ???? WebBrowser.ExecWB(7,1) ???伴?瑙? WebBrowser.ExecWB(8,1) ???伴〉?㈣?劇疆 WebBrowser.ExecWB(10,1) ?ョ??椤甸?㈠??? WebBrowser.ExecWB(15,1) 濂藉?????ら??锛???寰?纭?璁? WebBrowser.ExecWB(17,1) ?ㄩ?? WebBrowser.ExecWB(22,1) ?鋒?? WebBrowser.ExecWB(45,1) ?抽??绐?浣?????绀? ? 5.绀轟?锕? (a)璋???E????????涓衡?????界??绀轟?锕? <object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object> <A href=".:WebBrowser.ExecWB(4,1);" target="_blank" rel="external nofollow" >Save-瀛???lt;/A> ? (b)缁?杩??瑰?????婚??妯″? <object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object> <body 慰nl慰ad="showModalDialog('Untitled-1.html',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 .Click=document.all.WebBrowser.ExecWB(1,1) type=button value=??寮?> <input name=Button .Click=document.all.WebBrowser.ExecWB(2,1) type=button value=?抽??????> <input name=Button .Click=document.all.WebBrowser.ExecWB(4,1) type=button value=????涓?gt; <input name=Button .Click=document.all.WebBrowser.ExecWB(6,1) type=button value=????gt; <input name=Button .Click=document.all.WebBrowser.ExecWB(6,6) type=button value=?存?ユ????gt; <input name=Button .Click=document.all.WebBrowser.ExecWB(7,1) type=button value=???伴?瑙?> <input name=Button .Click=document.all.WebBrowser.ExecWB(8,1) type=button value=椤甸?㈣?劇疆> <input name=Button .Click=document.all.WebBrowser.ExecWB(10,1) type=button value=灞???gt; <input name=Button .Click=document.all.WebBrowser.ExecWB(17,1) type=button value=?ㄩ??> <input name=Button .Click=document.all.WebBrowser.ExecWB(22,1) type=button value=?鋒??gt; <input name=Button .Click=document.all.WebBrowser.ExecWB(45,1) type=button value=?抽??>

锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?锛?

瀹??存?绀哄??渚?锛?

<html>

<head>

<meta name=vs_targetSchema content=" http://schemas.microsoft.com/intellisense/ie5">

<title>????lt;/title>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<!--media=print 杩?涓?灞??у??浠ュ?ㄦ???版?舵????-->

<style media=print>

.Noprint{display:none;}

.PageNext{page-break-after: always;}

</style>

<style>

.tdp

{

border-bottom: 1 solid #000000;

border-left: 1 solid #000000;

border-right: 0 solid #ffffff;

border-top: 0 solid #ffffff;

}

.tabp

{

border-color: #000000 #000000 #000000 #000000;

border-style: solid;

border-top-width: 2px;

border-right-width: 2px;

border-bottom-width: 1px;

border-left-width: 1px;

}

.NOPRINT {

font-family: "瀹?浣?";

font-size: 9pt;

}

</style>

</head>

<body >

<center class="Noprint" >

<p>

<OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0>

</OBJECT>

<!--

?ㄤ???js??寮???椤甸?????window.close()锛? 浼?????绀烘?锛?寰????闆?ㄥ??浠ヤ??ㄤ?锛?娌℃????绀烘??存?ュ?抽??绐??c??

璇?璇?涓???唬??锛?

<object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">

</object>

<input type="button" name="Button" value="?抽??绐??? onClick="document.all.WebBrowser.ExecWB(45,1)">

璇????瑰?????頒?寰??闆?朵?涓?浜????斤?

WebBrowser.ExecWB(1,1) ??寮?

WebBrowser.ExecWB(2,1) ?抽???闆?ㄦ??????IE绐??o?骞舵??寮?涓?涓??扮????

WebBrowser.ExecWB(4,1) 淇?瀛?缃?椤?

WebBrowser.ExecWB(6,1) ????

WebBrowser.ExecWB(7,1) ???伴?瑙?

WebBrowser.ExecWB(8,1) ???伴〉?㈣?劇疆

WebBrowser.ExecWB(10,1) ?ョ??椤甸?㈠???

WebBrowser.ExecWB(15,1) 濂藉?????ら??锛???寰?纭?璁?

WebBrowser.ExecWB(17,1) ?ㄩ??

WebBrowser.ExecWB(22,1) ?鋒??

WebBrowser.ExecWB(45,1) ?抽??绐?浣?????绀?

杩?浜???瀵?E5.5浠ヤ?????????锛???????E6涓?娴?璇???锛???杩?????

--> <body> <input type=button value=??寮? 慰nclick=document.all.WebBrowser.ExecWB(1,1)>

<input type=button value=?抽???闆?ㄦ??????IE绐??e苟??寮?涓?涓??扮????慰nclick=document.all.WebBrowser.ExecWB(3,1)>

<input type=button value=缃?椤靛????涓?慰nclick=document.all.WebBrowser.ExecWB(4,1)>

<input type=button value=?ョ??椤甸?㈠???慰nclick=document.all.WebBrowser.ExecWB(10,1)>

<input type=button value=?ㄩ?? 慰nclick=document.all.WebBrowser.ExecWB(17,1)>

<input type=button value=?鋒??慰nclick=document.all.WebBrowser.ExecWB(22,1)>

<input type=button value=?抽??绐?浣?????绀?慰nclick=document.all.WebBrowser.ExecWB(45,1)> <input type=button value=????慰nclick=document.all.WebBrowser.ExecWB(6,1) >

<input type=button value=?存?ユ????慰nclick=document.all.WebBrowser.ExecWB(6,6)>

<input type=button value=???伴?瑙? 慰nclick=document.all.WebBrowser.ExecWB(7,1)>

<input type=button value=椤甸?㈣?劇疆 慰nclick=document.all.WebBrowser.ExecWB(8,1)> <br/>

</p>

<hr align="center" width="90%" size="1" noshade>

</center>

<table width="90%" align="center" cellpadding="2" cellspacing="0" class="tabp">

<tr>

<td colspan="3" class="tdp">绗?1椤?lt;/td>

</tr>

<tr>

<td width="29%" class="tdp"> </td>

<td width="28%" class="tdp"> </td>

<td width="43%" class="tdp"> </td>

</tr>

<tr>

<td colspan="3" class="tdp"> </td>

</tr>

<tr>

<td colspan="3" class="tdp"><table width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="50%" class="tdp"><p>杩??風???ヨ〃</p>

<p>瀵逛?????瑕?姹?灏卞?浜???</p></td>

<td> </td>

</tr>

</table></td>

</tr>

</table>

<hr align="center" width="90%" size="1" noshade class="NOPRINT" >

<!--??椤?->

<div class="PageNext"></div>

<table width="90%" align="center" cellpadding="2" cellspacing="0" class="tabp">

<tr>

<td class="tdp">绗?2椤?lt;/td>

</tr>

<tr>

<td class="tdp">???闆??椤典???lt;/td>

</tr>

<tr>

<td class="tdp"> </td>

</tr>

<tr>

<td class="tdp"> </td>

</tr>

<tr>

<td class="tdp"><table width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="50%" class="tdp"><p>杩??風???ヨ〃</p>

<p>瀵逛?????瑕?姹?灏卞?浜???</p></td>

<td> </td>

</tr>

</table></td>

</tr>

</table>

</body>

</html>

繼續閱讀