<%@ Page language="c#" Codebehind="WPrint.aspx.cs" AutoEventWireup="false" Inherits="ASPNETPrint._01WindowPrint.WPrint" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
   <title>WebForm1</title>
   <meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
   <meta name="CODE_LANGUAGE" Content="C#">
   <meta name="vs_defaultClientScript" content="JavaScript">
   <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
   <script language="javascript">
   function preview()
   {
   bdhtml=window.document.body.innerHTML;
   sprnstr="<!--startprint-->";
   eprnstr="<!--endprint-->";    //打印两者之间的内容
   prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
   prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
   window.document.body.innerHTML=prnhtml;
   window.print();
   }
   </script>
</HEAD>
<body MS_POSITIONING="GridLayout">
   <form >
   </form>
</body>
</HTML>

相关文章:

  • 2022-01-12
  • 2022-12-23
  • 2022-12-23
  • 2021-08-21
  • 2021-10-14
  • 2021-05-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-06
  • 2022-12-23
  • 2022-12-23
  • 2022-01-27
  • 2022-12-23
  • 2021-09-11
相关资源
相似解决方案