javascript asp教程第十课--global asa
global.asa:
first of all, what is a global.asa? it's an optional script file that holds certain "global" information that you can access through the entire asp appliciation. the global.asa is a plain text file saved with the .asa extension.
you should only have one global.asa and it should go in your top level directory.
below is an example global.asa file. don't try to understand the script just yet. we'll get to the specifics in the next two lessons.
<object runat=server scope=session id=myinfo progid="mswc.myinfo"> </object> <script runat="server" language="javascript"> function application_onstart() { application("somevariablename")="some value" } function application_onend() { application.contents.removeall() } function session_onstart() { session.timeout=15 } function session_onend() { //do nothing } </script> <!-- metadata type="typelib" file="c:\program files\common files\system\ado\msado15.dll" -->
list of can do's:
there are four things you can do with a global.asa.
1) object declarations
2) application events
3) session events
4) library reference.
i don't expect you understand any of that yet. just remember, there are only a few things we can do with the global.asa. let's move on to lesson 11.
推荐阅读
-
javascript asp教程第十一课--Application 对象
-
javascript asp教程第七课--response属性
-
javascript asp教程第十二课---session对象
-
javascript asp教程第四课 同时使用vbscript和javascript
-
javascript asp教程创建数据库连接
-
javascript asp教程第十课--global asa
-
javascript asp教程服务器对象
-
javascript asp教程第五课--合二为一
-
javascript asp教程第六课-- response方法
-
javascript asp教程More About Recordsets