There are other uses of this component, listed as follows:
(1,1) Open
(2,1) Close all IE windows now and open a new window
(4,1) Save the web page
(6,1) Print
(7,1) Print preview
(8,1) Print page settings
(10,1) View page properties
(15,1) It seems to be cancelled, and it is to be confirmed
(17,1) Select all
(22,1) Refresh
(45,1) Close the form silently
2. Paging printing
<HTML>
<HEAD>
<STYLE>
P {page-break-after: always}
</STYLE>
</HEAD>
<BODY>
<%while not %>
<P><%=rs(0)%></P>
<%%>
<%wend%>
</BODY>
</HTML>
3. How to remove the path at the bottom of the page and the page number at the top when printing ASP page
(1) I'm file -> page settings -> remove all the header and footer inside, and you won't print it 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 the header and footer of the web page printing to empty
function pagesetup_null()
on error resume next
Set RegWsh = CreateObject("")
hkey_key="\header"
hkey_root+hkey_path+hkey_key,""
hkey_key="\footer"
hkey_root+hkey_path+hkey_key,""
end function
'//Set the header and footer of web page printing to the default value
function pagesetup_default()
on error resume next
Set RegWsh = CreateObject("")
hkey_key="\header"
hkey_root+hkey_path+hkey_key,"&w&b page number,&p/&P"
hkey_key="\footer"
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="Clear page number" onclick=pagesetup_null()> <input type="button" value="Recover page" onclick=pagesetup_default()><br/>
</p>
</BODY>
</HTML>
4. Floating frame printing
<SCRIPT LANGUAGE=javascript>
function button1_onclick() {
var odoc=window.;
var r=();
var stxt=;
alert(stxt)
var pwin=("","print");
(stxt);
();
}
</SCRIPT>
4. Use FileSystem component to implement local specific printing in WEB applications
<script Language=VBScript>
function print_onclick //Print function
dim label
label= //Get the HTML page data
set objfs=CreateObject("") //Create an instance of the FileSystem component object
set objprinter= ("LPT1:",true) //Create a connection with the printer
("_____________________________________") //Output the printed content
(" ")
(" The data you print is: "&label& " ")
(" ")
("_________________________________")
//Disconnect the printer
set objprinter=nothing
set objfs=nothing // Close FileSystem component object
end function
</script>
Previous page1234567891011121314151617181920Next pageRead the full text