01.
<script language=
"javascript"
>
02.
function
printpr()
03.
{
04.
var
OLECMDID = 6;
05.
06.
07.
08.
09.
10.
11.
var
PROMPT = 1;
12.
var
WebBrowser =
'<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>'
;
13.
document.body.insertAdjacentHTML(
'beforeEnd'
, WebBrowser);
14.
WebBrowser1.ExecWB(OLECMDID, PROMPT);
15.
WebBrowser1.outerHTML =
""
;
16.
}
17.
</script>