Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ASPÍøÒ³¼ÆÊýÆ÷Ô´´úÂë

1¡¢ÔÚÍøվĿ¼ÏÂн¨Ò»¸öÎı¾£ºtxtcounter.txt ÔÚÎı¾Ìîд1»òÆäËûʶ×Ö
2¡¢Ð½¨Ò»aspÎļþ£ºcount.asp£¬¼ÓÈëÒÔÏ´úÂ룺
<% 
CountFile=Server.MapPath("txtcounter.txt") 
Set FileObject=Server.CreateObject("Scripting.FileSystemObject") 
Set Out=FileObject.OpenTextFile(CountFile,1,FALSE,FALSE) 
counter=Out.ReadLine 
Out.Close 
SET FileObject=Server.CreateObject("Scripting.FileSystemObject") 
Set Out=FileObject.CreateTextFile(CountFile,TRUE,FALSE) 
Application.lock 
counter= counter + 1 
Out.WriteLine(counter) 
Application.unlock 
Response.Write"document.write("&counter&")"
'ΪÁËÔÚÒ³ÃæÕýÈ·ÏÔʾ¼ÆÊýÆ÷µÄÖµ£¬µ÷ÓÃVBScriptº¯ÊýDocument.write
Out.Close
%> 
3¡¢ÔÚÐèÒª¼ÆÊýµÄÍøÒ³¼ÓÈ룺×Ü·ÃÎÊ<script language="JavaScript" src="count.asp">´Î
ÏÖÔÚ¿´ÍøÒ³¾ÍÊÇ¿ÉÒÔ¼ÆÊýÁË£¡
 
ÓëÒ³Ãæ·ÖÀëµÄͼÏó¼ÆÊýÆ÷
¡¡¡¡ÈËÃǵÄ×·ÇóÊÇÓÀÎÞÖ¹¾³µÄ£¬Ò²ÐíÄãÐèÒªÒ»¸ö¸üÓиöÐÔµÄͼÐÎÊý×Ö¼ÆÊýÆ÷£¬¶ø²»ÊǼòµ¥µÄÎı¾Êý×Ö¼ÆÊýÆ÷¡£Ã»ÎÊÌ⣬ÏÖÔÚÎÒÃǾÍÀ´¿´¿´ÓÃASPÊÇÔõÑùÀ´ÊµÏÖͼÐμÆÊýÆ÷¹¦Äܵġ£ÒªÊµÏÖͼÐμÆÊýÆ÷£¬¹Ø¼üµãÔÚÓÚÈçºÎʵÏְѼÆÊýÆ÷ÎļþÖеÄÊý¾Ýֵת±äΪ¶ÔÓ¦µÄͼÏó±íʾ¡£ÒòΪʮ½øÖÆÊýÓÐ0,1,2,3,4,5,6,7,8,9¹²Ê®¸ö²»Í¬µÄÊýÊý×Ö£¬ÎÒÃÇÐèÒªÓÐÊ®¸ö¶ÔÓ¦µÄͼÏó£¬ÇÒͼÏóµÄÎļþÃû×ÖÒªÓëÏÔʾµÄÊý×Ö¶ÔÓ¦ÆðÀ´£¬±ÈÈç0¶ÔÓ¦µÄÊý×ÖͼÏóµÄÎļþÃû×Ö¾ÍÊÇ0.gif£¬1¶ÔÓ¦µÄ¾ÍÊÇ1.gif£¬...(ͼÏó×Ô¼º¿ÉÒÔÓÃPhotoshopµÈ¹¤¾ßÖÆ×÷£¬»òÕß´ÓÍøÂçÉÏÏÂÔØ)¡£ÕâÀïÎÒÃÇÒªÓõ½VBScriptº¯ÊýLen(string | varname)¡¢Mid(string,start[,length])¡£ÓÉLen(counter)¿ÉµÃµ½¼ÆÊýÆ÷ÖµµÄλÊý,ÓÉMid(counter,i,1)¿ÉÒԵõ½¼ÆÊýÆ÷ÖµµÄµÚiλÉϵÄÊý×Ö£¬ÎÒÃÇ¿ÉÀûÓÃÕâ¸öÖµÀ´µ÷ÓÃÏàÓ¦µÄÊý×ÖͼÏó¡£ÓÃForÑ­»·Óï¾ä,ÎÒÃDz»Äѵóö¼ÆÊýÆ÷Öµ¸÷¸öλÉϵÄÊý×Ö²¢×ª»¯³É¶ÔÓ¦µÄÊý×ÖͼÏó£¬ÕâÑù£¬ÎÒÃǾÍÄÜʵÏÖÎı¾ÊýÖµµ½Í¼ÏóÊý×ÖµÄת±ä¡£ÏÂÃæ¾ÍÊÇÒ»¸öÓÃASP±àдµÄͼÏó¼ÆÊýÆ÷ʵÀý£¬ÒòΪ´ó²¿·Ö´úÂëÇ°Ã涼·ÖÎö¹ý£¬ËùÒÔ´úÂëÖÐÖ»×¢ÊÍÁ˲¿·ÖÓï¾ä¡£
ÓëÒ³Ãæ·ÖÀëµÄͼÏó¼ÆÊýÆ÷imgcounter.asp´úÂë:
<% @language="VBScript"%>
<% 
dim images(20)
'¶¨ÒåÒ»Êý×飬ÓÃÀ´´æ·ÅÏÔʾÿһλÊý×ÖͼÏóµÄÓï¾ä
CountFil


Ïà¹ØÎĵµ£º

aspÕýÔò±í´ïʽÅжÏÊÇ·ñÊÇÊý×Ö

'ÅжÏÊÇ·ñÊÇÊý×Ö£¨°üÀ¨ÕûÊýºÍ¸¡µãÊý£©
function IsNumber(str)
if RegPatrn("^-?[1-9]\d*$",str) or RegPatrn("^-?([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$",str) then
IsNumber=true
else
IsNumber=false
end if
end function
'ÕýÔò±í´ïʽÅжÏÊÇ·ñÆ¥Åä
Function RegPatrn(patrn, strng)
RegPatrn = false
Di ......

2¡¢´¿ASP´úÂëÉú³Éͼ±íº¯Êý——Öùͼ

2¡¢´¿ASP´úÂëÉú³Éͼ±íº¯Êý——Öùͼ
<%
dim total(12,2)
total(1,1)=56
total(2,1)=7
total(3,1)=-7
total(4,1)=0
total(5,1)=16
total(6,1)=10
total(7,1)=14
total(8,1)=7
total(9,1)=9
total(10,1)=7
total(11,1)=11
total(12,1)=14
total(1,2)="µØÀí"
total(2,2)="»¯Ñ§"
total(3,2)="ÀúÊ· ......

3¡¢´¿ASP´úÂëÉú³Éͼ±íº¯Êý——ÕÛÏßͼ

3¡¢´¿ASP´úÂëÉú³Éͼ±íº¯Êý——ÕÛÏßͼ
<%dim total(7,3)
total(1,0)="Öйú¾­Óª±¨"
total(2,0)="ÕÐƸÍø"
total(3,0)="51Job"
total(4,0)="ÐÂÃñÍí±¨"
total(5,0)="ÐÂÎÅÍí±¨"
total(6,0)="ÄÏ·½ÖÜÄ©"
total(7,0)="Ñò³ÇÍí±¨"
total(0,1)="#FF0000,1.5,1,2,¹«Ë¾1"'²ÎÊý1ÏßÌõµÄÑÕÉ«£¬²ÎÊý2ÏßÌõµÄ¿í¶È£¬²ÎÊý3Ï ......

ASP³£Óú¯ÊýÏê½â

Array()
¡¡¡¡FUNCTION: ·µ»ØÒ»¸öÊý×é
¡¡¡¡SYNTAX: Array(list)
¡¡¡¡ARGUMENTS: ×Ö·û£¬Êý×Ö¾ù¿É
¡¡¡¡EXAMPLE: <%
¡¡¡¡Dim myArray()
¡¡¡¡For i = 1 to 7
¡¡¡¡Redim Preserve myArray(i)
¡¡¡¡myArray(i) = WeekdayName(i)
¡¡¡¡Next
¡¡¡¡%[/IMG]
¡¡¡¡RESULT: ½¨Á¢ÁËÒ»¸ö°üº¬7¸öÔªËصÄÊý×émyArray
¡ ......

ASPÓëJSPµÄ±È½Ï

ASPÓëJSPµÄ±È½Ï
´Ó΢ÈíÍƳöÁËASP(ActiveServerPage)ºó£¬ËüÒÔÆäÇ¿´óµÄ¹¦ÄÜ£¬¼òµ¥Ò×ѧµÄÌصã¶øÊܵ½¹ã´óWEB¿ª·¢ÈËÔ±µÄϲ»¶¡£µ«ÊÇËüÈ´ÓÐ΢Èí²úÆ·µÄͨ²¡,Ö»ÄÜÔÚWindowsƽ̨ÏÂʹÓã¬ËäÈ»Ëü¿ÉÒÔͨ¹ýÔö¼Ó¿Ø¼þ¶øÔÚLINUXÏÂʹÓ㬵«ÊÇÆ书ÄÜ×îÇ¿´óµÄDCOM¿Ø¼þÈ´²»ÄÜʹÓ᣶øSUN¹«Ë¾ÔÚJAVAµÄ»ù´¡Ï¿ª·¢³öµÄJSP(Java ServerPages)ʵÏÖÁ˶ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ