ASP¿ª·¢WEB´òÓ¡´úÂë´óÈ«
¡¡¡¡ÕâÆªÎÄÕÂÖ÷Òª½éÉÜÁËÈçºÎʹÓÃASP¿ØÖÆWebµÄ¸÷ÖÖ´òӡЧ¹û£¬ËüÄܹ»¿ØÖÆ×Ý´ò¡¢ºá´òºÍÒ³Ãæ±ß¾àµÈ¡£
¡¡¡¡
¡¡¡¡1¡¢¿ØÖÆ"×Ý´ò"¡¢ "ºá´ò"ºÍ"Ò³ÃæµÄ±ß¾à"¡£
¡¡¡¡
¡¡¡¡£¨1£©
¡¡¡¡
¡¡¡¡< script defer>
¡¡¡¡function SetPrintSettings() {
¡¡¡¡// -- advanced features
¡¡¡¡factory.printing.SetMarginMeasure(2) // measure margins in inches
¡¡¡¡factory.SetPageRange(false, 1, 3) // need pages from 1 to 3
¡¡¡¡factory.printing.printer = "HP DeskJet 870C"
¡¡¡¡factory.printing.copies = 2
¡¡¡¡factory.printing.collate = true
¡¡¡¡factory.printing.paperSize = "A4"
¡¡¡¡factory.printing.paperSource = "Manual feed"
¡¡¡¡
¡¡¡¡// -- basic features
¡¡¡¡factory.printing.header = "This is MeadCo"
¡¡¡¡factory.printing.footer = "Advanced Printing by ScriptX"
¡¡¡¡factory.printing.portrait = false
¡¡¡¡factory.printing.leftMargin = 1.0
¡¡¡¡factory.printing.topMargin = 1.0
¡¡¡¡factory.printing.rightMargin = 1.0
¡¡¡¡factory.printing.bottomMargin = 1.0
¡¡¡¡}
¡¡¡¡< /script>
¡¡¡¡
¡¡¡¡£¨2£©
¡¡¡¡
¡¡¡¡< script language="javascript">
¡¡¡¡function printsetup(){
¡¡¡¡// ´òÓ¡Ò³ÃæÉèÖÃ
¡¡¡¡wb.execwb(8,1);
¡¡¡¡}
¡¡¡¡function printpreview(){
¡¡¡¡// ´òÓ¡Ò³ÃæÔ¤ÀÀ
¡¡¡¡wb.execwb(7,1);
¡¡¡¡}
¡¡¡¡
¡¡¡¡function printit()
¡¡¡¡{
¡¡¡¡if (confirm('È·¶¨´òÓ¡Âð£¿')) {
¡¡¡¡wb.execwb(6,6)
¡¡¡¡}
¡¡¡¡}
¡¡¡¡< /script>
¡¡¡¡< /head>
¡¡¡¡< body>
¡¡¡¡< OBJECT classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"
¡¡¡¡height=0 id=wb name=wb width=0>< /OBJECT>
¡¡¡¡< input type=button name=button_print value="´òÓ¡" onclick="javascript:printit()">
¡¡¡¡< input type=button¡¡name=button_setup value="´òÓ¡Ò³ÃæÉèÖÃ" onclick="javascript:printsetup();">
¡¡¡¡< input type=button¡¡name=button_show value="´òÓ¡Ô¤ÀÀ" onclick="javascript:printpreview();">
¡¡¡¡< input type=button name=button_fh value="¹Ø±Õ" onclick="javascript:window.close();">
¡¡¡¡------------------------------------------------
¡¡¡¡¹ØÓÚÕâ¸ö
Ïà¹ØÎĵµ£º
¡¡¡¡Ç°Õó×Ó¸ÕÍê³ÉÒ»¸öB/S¼Ü¹¹µÄѧУ°ì¹«ÏµÍ³£¬Ìå»á¾ÍÊDZíÌ«¶à£¬ÎļþÌ«¶à£¬¶øÃ¿¸öÎļþÖÐÀàËÆµÄ²Ù×÷£¨´úÂ룩Ҳ̫¶àÁË£¬ÀýÈçѧÉúÐÅÏ¢ºÍ½ÌʦÐÅÏ¢²Ù×÷£¬student.asp,teacher.asp£¬ÕâÁ½¸öÎļþҪʵÏֵŦÄÜÓУ¬Ìí¼Ó¡¢É¾³ý¡¢Ð޸ġ¢ÏÔʾ½ÌʦºÍѧÉúÐÅÏ¢£¬Á½¸öÎļþÖоÍÓкܶàÏàͬµÄ´úÂ룺±ÈÈ磺
¡¡¡¡ÏÔʾÐÅÏ¢£¬do while not rs.eof,rs ......
ASPÓëJSPµÄ±È½Ï
¡¡¡¡´Ó΢ÈíÍÆ³öÁËASP(ActiveServerPage)ºó£¬ËüÒÔÆäÇ¿´óµÄ¹¦ÄÜ£¬¼òµ¥Ò×ѧµÄÌØµã¶øÊܵ½¹ã´óWEB¿ª·¢ÈËÔ±µÄϲ»¶¡£µ«ÊÇËüÈ´ÓÐ΢Èí²úÆ·µÄͨ²¡,Ö»ÄÜÔÚWindowsƽ̨ÏÂʹÓã¬ËäÈ»Ëü¿ÉÒÔͨ¹ýÔö¼Ó¿Ø¼þ¶øÔÚLINUXÏÂʹÓ㬵«ÊÇÆä¹¦ÄÜ×îÇ¿´óµÄDCOM¿Ø¼þÈ´²»ÄÜʹÓ᣶øSUN¹«Ë¾ÔÚJAVAµÄ»ù´¡Ï¿ª·¢³öµÄJSP(Java
ServerPages)Ê ......
<%
Response.Buffer = true
Response.Clear
dim url
Dim fso,fl,flsize
dim Dname
Dim objStream,ContentType,flName,isre,url1
Dim strFileName
strFileName=replace(replace(Request("file"),"\",""),"/","") '´«²Î
strFileName="/files/"&strFileName ' ¸Ä³ÉÄãÄãÎļþµÄ´æ ......
·½·¨Ò» : ½ûÓÃHTML
×î¼òµ¥µÄ·½·¨ÊÇÖ±½Ó½ûÓÃhtml±êÇ©¶ø²»ÓÃÒÆ³ýËüÃÇ. ¿ÉÒÔʹÓÃReplace()º¯Êý. ÀýÈç:
strText = Replace(strText, "<script", "<script", 1, -1, 1)
»òÕßÖ±½Ó½ûÓÃËùÓеÄhtml:
strText = Replace(strText, "<", "<")
ÕâÑù×öËäÈ»ºÜ°²È«,µ«ÏԵò»¹»ÓѺÃ.(Óû§Ìá½»µÄÎı¾»á±äµ ......