Place the part to be printed in <Div id = "printsection"> </div>
Then use the following function
Function printsection ()
{
VaR AAA = Document. All. printsection. innerhtml;
VaR DDD = Document. Body. innerhtml;
Document. Body. innerhtml = aaa;
Window. Print ();
Document. Body. innerhtml = DDD;
Return false;
}
With the control, set it first
<Object ID = "webbrowser" width = 0 Height = 0 classid = "CLSID: 8856f961-340a-11d0-a96b-00c04fd705a2">
</Object>
<Input name = "printformview" type = "button" value = "printer settings" onclick = Document. All. webbrowser. execwb (6, 1) class = "button">
<Input name = "printform2" type = "button" value = "page setting" onclick = Document. All. webbrowser. execwb (8, 1) class = "button">
<Input name = "printform" type = "button" value = "print" onclick = Document. All. webbrowser. execwb (6) class = "button">