网页打印完整代码

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css" media=print>
.noprint{display : none }
</style>
</head>

<SCRIPT language=javascript>
  function printsetup(){
  // 打印页面设置
  wb.execwb(8,1);
  } 
  function printpreview(){ 
  // 打印页面预览
  wb.execwb(7,1);
  }
  function printit() 
  { 
  if (confirm('确定打印吗?')) {
  wb.execwb(6,6) 
  } 
  } 
</SCRIPT>

</head>

<BODY>

<DIV align=center>

   <p>

     <OBJECT id=wb height=0 width=0 

classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 name=wb>

     </OBJECT>

     打印内容开始:   </p>

   <p> Many people have asked about the meaning of our name. &quot;Baidu&quot; was inspired by a    poem written more than

800 years ago during the Song Dynasty. The poem compares    the search for a retreating beauty amid chaotic glamour with the

search for    one's dream while confronted by life's many obstacles. &quot;…hundreds and thousands    of times, for her I

searched in chaos, suddenly, I turned by chance, to where    the lights were waning, and there she stood.&quot; Baidu, whose

literal meaning is    hundreds of times, represents persistent search for the ideal.</p>

   <p>打印的内容结束<br />

   </p>

   <p class="noprint"><!--class="noprint"的作用是标示不需要打印的地方-->

<INPUT οnclick=javascript:printit() type=button value=打印 name=button_print /> 

<INPUT οnclick=javascript:printsetup(); type=button value=打印页面设置 name=button_setup /> 

<INPUT οnclick=javascript:printpreview(); type=button value=打印预览 name=button_show /> 

</p>

</DIV>

</body>

</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值