正在加载图片...
、须清楚的几个概念(续) 例子13:ASP的另一种格式 <body> script| anguage=“ Jscript runat= server”> function sayhelloo response. write( hello!) </script> sayhelloo%> </body> 汪 t language=Jscript runat= server>∴.</ script, runat= server说明该脚本程序运行在服务 器端,否则其运行在客户端。结果为helo! 2)服务器端语句只可调用在服务器端定义的函数和子程序,不能调用 客户端定义的函数,反之也成立 (3)如果上述程序中去掉 runat= servel(或 runat=" server"),则程序运行会 出错。 (广东学钱术取业学院二、须清楚的几个概念(续) • 例子1-3:ASP的另一种格式 <body> <script language=“Jscript” runat=“server”> function sayhello() { response.write(“hello! ”) } </script> <% sayhello() %> </body> 注: (1)程序使用脚本语言,<script language=Jscript runat=server>...</script>, runat=server 说明该脚本程序运行在服务 器端,否则其运行在客户端。结果为 hello! (2)服务器端语句只可调用在服务器端定义的函数和子程序,不能调用 客户端定义的函数,反之也成立。 (3)如果上述程序中去掉runat=server(或runat="server"),则程序运行会 出错
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有