日期:2014-05-18 浏览次数:20517 次
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Maticsoft.Web.WebForm1" %> <html> <head runat="server"> <title>无标题页</title> <script language="javascript" type="text/javascript"> function PrintTicket() { var fso1 = new ActiveXObject("Scripting.FileSystemObject"); var printCom = fso1.CreateTextFile("COM3", true); printCom.WriteLine("需要打印的字。。。"); printCom.Close(); } </script> </head> <body> <form id="form1" runat="server"> <div> <asp:Button ID="Button3" runat="server" Text="打印小票" OnClientClick="PrintTicket();return false;" /> </div> </form> </body> </html>