二、分頁(yè)打印
<html> <head> <style> p {page-break-after: always} </style> </head> <body> <%while not rs.eof%> <p><%=rs(0)%></p> <%rs.movenext%> <%wend%> </body> </html> 三、asp頁(yè)面打印時(shí)如何去掉頁(yè)面底部的路徑和頂端的頁(yè)碼編號(hào) 。1)ie的文件-〉頁(yè)面設(shè)置-〉講里面的頁(yè)眉和頁(yè)腳里面的東西都去掉,打印就不出來(lái)了。 。2)
<html> <head> <title> new document </title> <meta name="generator" content="editplus"> <meta name="author" content="yc"> <script language="vbscript">
dim hkey_root,hkey_path,hkey_key hkey_root="hkey_current_user" hkey_path="\software\microsoft\internet explorer\pagesetup" //設(shè)置網(wǎng)頁(yè)打印的頁(yè)眉頁(yè)腳為空 function pagesetup_null() on error resume next set regwsh = createobject("wscript.shell") hkey_key="\header" regwsh.regwrite hkey_root+hkey_path+hkey_key,"" hkey_key="\footer" regwsh.regwrite hkey_root+hkey_path+hkey_key,"" end function //設(shè)置網(wǎng)頁(yè)打印的頁(yè)眉頁(yè)腳為默認(rèn)值 function pagesetup_default() on error resume next set regwsh = createobject("wscript.shell") hkey_key="\header" regwsh.regwrite hkey_root+hkey_path+hkey_key,"&w&b頁(yè)碼,&p/&p" hkey_key="\footer" regwsh.regwrite hkey_root+hkey_path+hkey_key,"&u&b&d" end function </script> </head>
<body> <br/> <br/> <br/> <br/> <br/> <br/><p align=center> <input type="button" value="清空頁(yè)碼" onclick=pagesetup_null()> <input type="button" value="恢復(fù)頁(yè)嗎" onclick=pagesetup_default()><br/>
</p> </body> </html>
|