WEBBROWSER.EXECWB (1,1) Open
WEB.EXECWB (2,1) closes all of the IE windows now and opens a new window
WEB.EXECWB (4,1) Save Web page
WEB.EXECWB (6,1) printing
WEB.EXECWB (7,1) Print preview
WEB.EXECWB (8,1) print Page Setup
WEB.EXECWB (10,1) view page Properties
WEB.EXECWB (15,1) seems to be withdrawn, pending confirmation
WEB.EXECWB (17,1) Select all
WEB.EXECWB (22,1) Refresh
WEB.EXECWB (45,1) Close the form without prompting
2, Paging printing
<HTML>
<HEAD>
<STYLE>
P {Page-break-after:always}
</STYLE>
</HEAD>
<BODY>
<%while not rs.eof%>
<p><%=rs (0)%></p>
<%rs.movenext%>
<%wend%>
</BODY>
</HTML>
3. How to get rid of the path at the bottom of the page and the number of the top page when printing ASP page
(1) IE file-〉 page settings-〉 said inside the header and footer inside of the things are removed, printing will not come out.
(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"
'//Set page to print header and footer empty
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
'//Set the page header footer as the default value
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 page number, &p/&p"
hkey_key= "\footer"
Regwsh.regwrite Hkey_root+hkey_path+hkey_key, "&u&b&d"
End Function
</script>
</HEAD>
</p>
</BODY>
</HTML>
4, floating frame printing
<script language=& #106avascript >
function button1_& #111nclick () {
var odoc=window.iframe1.document;
var r=odoc.body.createtextrange ();
var Stxt=r.htmltext;
Alert (Stxt)
var Pwin=window.open ("", "print");
Pwin.document.write (Stxt);
Pwin.print ();
}
</SCRIPT>
4, using the FileSystem component to implement the local specific printing in the Web application
<script language=vbscript>
function print_& #111nclick//print functions
Dim label
label=document.printinfo.label.& #118alue//access to HTML page data
Set Objfs=createobject ("Scripting.FileSystemObject")//Create an instance of the FileSystem Component object
Set OBJPRINTER=OBJFS. CreateTextFile ("LPT1:", true)//establish a connection to the printer
Objprinter. Writeline ("__________________________________")/output printed content
Objprinter. Writeline ("| |")
Objprinter. Writeline ("| The data you printed is: "&label& |"
Objprinter. Writeline ("| |")
Objprinter. Writeline ("|_________________________________|")
Objprinter.close//Disconnect from the printer
Set objprinter=nothing
Set objfs=nothing//close FileSystem Component Object
End Function
</script>
Server-side scripting:
<% .....
Set Conn=server. CreateObject ("Adodb.connection")
Conn. Open "Dsn=name; uid=xxxx; pwd=xxxx; "
Set Rs=server. CreateObject ("Adodb.recordset")
Rs. Open ("Select ..."), conn,1,1
..........%>//interacting with the database
HTML page encoding:
<HTML>
.........
<form id=printinfo name= "Printinfo" >
<input type= "button" & #118alue = "Print >>" Id=print name=print >//Call print function
<input Type=hidden id=text1 Name=label & #118alue =<%=.........%>>//Save data from server side
.........
</HTML>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service