All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

 
ASP.NET通过IE直接打印_[Asp.Net教程]

Writer: delv Article type: Programming skills(编程技巧) Time: 2014/1/24 9:08:17 Browse times: 360 Comment times: 0

ASP.NET通过IE直接打印_[Asp.Net教程]


Head photo

Go homepage
Upload pictures
Write articles

ASP.NET通过IE直接打印_[Asp.Net教程]























⒈通过Window.Print()直接打印

<%@ Page language="c#" Codebehind="WPrint.aspx.cs" AutoEventWireup="false" Inherits="ASPNETPrint._01WindowPrint.WPrint" %>



WebForm1








本部分以上不被打印




















本部分以下不被打印




onclick="preview()">




不打印










打印








onclick="window.print()" value="print">



上面的preview()方法是用来打印的方法,如果要打印网页中的某一部分,只要把这一部分标记为



中就可以了





上面的样式用来控制打印时是否显示,如果不要显示,只要把他的class设置为Noprn即可.




来源:网络















































There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.