javascript asp教程サーバ対象
2524 ワード
Overview:
The Server Object has seven(7)Methods,one(1)Property,ゼロ(0)Events,andゼロ(0)Collection.
List of Methods:
Server Methods
CreateObject()
Server.reat Object(「ADODB.Recordset」)Create an instance of an Object
Execute()
Server.Execute(「fileName.asp」)Executes an out side file(effect is simiar to SSI)
GetLastError()
Server.GetLastError()Returns location and description of the last ASP error
HTMLEncode()
Server.HTMLEncode(「some String」)Encdes string to HTML characters
MapPath()
Server.MapPath(\\virtual Folder)Coverts virtual path to physical path
Transfer()
Server.Transfer(「fileName.asp」)Trans fers execution out of one page and into another
URLEncode()
Server.URLEncode(「some String」)Encdes string to URL standrds
Below is the script for Lesson 14.
Resonse.Write(output Script)
%
Click Here to run the script in a new window.
I demostrated four methods in the script 14.asp.We'll Tale them from top to bottom.
Explining the Script:
Server.URLEncode()does exactly what you think it does.It taries a string and encodes it RFC 1738 standars.That's moree ated to know about Server.URLEncode()は、isn't?
Next we have Server.reate Object().In this case I created an instance of the FileSystem Object.The most common Object.The most commoojectststhat you will instanciate arare ADODB.Recocodset,Scripptinin. FileSystemObject,Scrriptinininininininininininin. DiDiDictctctinininininininininininininininininininininininininininininininin. Dictstststststststststststststststststststststststststststststststststststststststststston all of these created Object.Most of them are beyond thescope of this web site.
Next on the list is Server.MapPath().Looking back at script 14.asp,do you see the double slashes(\)in the MapPath argment?That's not an accident.We have to use escape characters JavaScript.
The last Method I demostrate is Server.HTMLEncode().It converts HTML flags into non-HTML equivalents.
The Lone Property:
Server has one property:Script Timeout.It sets the maximnumber of seconnds allowable for script execution.If the script execution exceedth that time,then it it it times out.The user gets ugly message the
The Server Object has seven(7)Methods,one(1)Property,ゼロ(0)Events,andゼロ(0)Collection.
List of Methods:
Server Methods
CreateObject()
Server.reat Object(「ADODB.Recordset」)Create an instance of an Object
Execute()
Server.Execute(「fileName.asp」)Executes an out side file(effect is simiar to SSI)
GetLastError()
Server.GetLastError()Returns location and description of the last ASP error
HTMLEncode()
Server.HTMLEncode(「some String」)Encdes string to HTML characters
MapPath()
Server.MapPath(\\virtual Folder)Coverts virtual path to physical path
Transfer()
Server.Transfer(「fileName.asp」)Trans fers execution out of one page and into another
URLEncode()
Server.URLEncode(「some String」)Encdes string to URL standrds
Below is the script for Lesson 14.
Now let's see a reprint of Script14a.asp.
I did not type it manually. Instead, I let
Server.CreateObject( ) do all the work.
" + outputScript + "
","Resonse.Write(output Script)
%
Click Here to run the script in a new window.
I demostrated four methods in the script 14.asp.We'll Tale them from top to bottom.
Explining the Script:
Server.URLEncode()does exactly what you think it does.It taries a string and encodes it RFC 1738 standars.That's moree ated to know about Server.URLEncode()は、isn't?
Next we have Server.reate Object().In this case I created an instance of the FileSystem Object.The most common Object.The most commoojectststhat you will instanciate arare ADODB.Recocodset,Scripptinin. FileSystemObject,Scrriptinininininininininininin. DiDiDictctctinininininininininininininininininininininininininininininininin. Dictstststststststststststststststststststststststststststststststststststststststststston all of these created Object.Most of them are beyond thescope of this web site.
Next on the list is Server.MapPath().Looking back at script 14.asp,do you see the double slashes(\)in the MapPath argment?That's not an accident.We have to use escape characters JavaScript.
The last Method I demostrate is Server.HTMLEncode().It converts HTML flags into non-HTML equivalents.
The Lone Property:
Server has one property:Script Timeout.It sets the maximnumber of seconnds allowable for script execution.If the script execution exceedth that time,then it it it times out.The user gets ugly message the