JS printing function code can achieve print preview print Settings etc

  • 2020-03-30 04:15:56
  • OfStack

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> China green kitchen project </title>
<style>
@media print{
  .noprint{
    display:none
  }
}
</style>
<script language=javascript>   
function printsetup(){
  //Print page Settings
  wb.execwb(8,1);  
}
function printpreview(){
  //Print page preview
  wb.execwb(7,1);
}
function printit(){
 if (confirm(' Are you sure to print? ')){
  wb.ExecWB(6,1)
  //wb.execwb(1,1)// Open the 
  //wb.ExecWB(2,1);// Close everything now IE Window and open a new window 
  //wb.ExecWB(4,1)//; Save the web page 
  //wb.ExecWB(6,1)// print 
  //wb.ExecWB(7,1)// Print preview 
  //wb.ExecWB(8,1)// Print page Settings 
  //wb.ExecWB(10,1)// View page properties 
  //wb.ExecWB(15,1)// It seems to be withdrawn. To be confirmed 
  //wb.ExecWB(17,1)// Future generations 
  //wb.ExecWB(22,1)// The refresh 
  //wb.ExecWB(45,1)// Close the form without prompting 
 }
}
</script>
</head>
<body>
<div class="noprint" style="width:640px;height:20px;margin:100px auto 0 auto;font-size:12px;text-align:right;">
    <input value=" print " type="button" onclick="javascript:window.print()" />
    <OBJECT classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0" id="wb" name="wb" width="0">
    </OBJECT>
    <input type=button name=button_print style="display:none;" value=" Print this document " onclick="javascript:printit()">
    <input type=button name=button_setup value=" Print page Settings " onclick="javascript:printsetup();">
    <input type=button name=button_show value=" Print preview " onclick="javascript:printpreview();">
    <input type=button name=button_fh value=" Shut down " onclick="javascript:window.close();">
</div>
<div style="width:640px;height:624px;margin:20px auto;">
  community 

 -- to the remotest and poorest places 

 Xiadang township, one of the most remote mountain townships in shouning county, 1988 Year just build a township, was once " 5 no villages and towns "( No roads, no running water, no lights, no revenue, no office space ) . 

  1989 years 7 month 19 Xi jinping, then secretary of the ningde district committee, led the relevant departments in charge of trekking on the rugged mountain road in the scorching sun, wearing straw hat and towel on shoulder 2 More than an hour, deep into the township government in the underground party village. 

 Township party committee, government temporary in luan peak bridge side of the wang ancestral hall office, conditions are extremely simple, everyone sat on a small bench meeting. After lunch and a short rest, xi went to the village to visit the poor. 

 The return journey is still on foot 10 More than a kilometer, the road slope is dangerous and steep, and the bramble grass is overgrown, xi jinping and his party take the firewood knife to block in the road bramble, reed stalk cut. Until the evening 8 Around the point, they just returned to shouning chengguan. 

 Lian delgren, then a member of the standing committee of the shouning county party committee and an executive deputy head of the county, wrote in his diary: " This day, by bus 5 Two hours, on foot 4 Half an hour, meeting on poverty 2 Hours, all the way the dust, sweat, hard degree is self-evident... After returning to the county guest house, many cadres found that the soles of their feet and toes were worn out with blood blisters. "

 Comrade xi jinping later used it " Very hard, very memorable " To describe the next party trip. 1989 years 7 month 26 Day, 1996 years 8 month 7 He came to the party twice to coordinate the local construction and development problems. 

 Whether he was the leader of xiamen, ningde or later the provincial capital fuzhou, xi always kept in mind the safety of the people, and visiting the poor became an indispensable part of his work. " Three down the party township " "Is just a microcosm of xi jinping's vision for the people. 

 As vice mayor of xiamen, xi was in charge of agriculture and rural work. He pointed out that in charge of agriculture, the first is to go up the mountains, down the islands. 

 Guo anmin, former deputy director of the standing committee of the xiamen municipal people's congress and then head of tongan county, remembers that when he accompanied xi on a research trip to the countryside, the party secretary invited them to tea. After a long time of making gongfu tea, the teacup was a little dirty with theophylline on it. " In the past, leaders usually bring their own thermos cup to the countryside. Once they sit down, the secretary will bring the cup. Comrade xi jinping's drink has brought him closer to the grassroots. " Guo anmin exclaimed. 

 Xi stressed: " We should do less work at the grassroots level ' The icing on the cake ' , how do ' Nice surprise ' And don't ' herd ' Seems to rush to work on a good basis ' hot ' Go where the going is, go where the going is ' upset ' To send warmth and do practical work to places and the masses where there are many problems, difficulties and bitter conditions. "
</div>

<div id="dd"></div>
</body>
</html> 


Related articles: