且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

什么是之间和LT的差异;%%GT;和< SCRIPT LANGUAGE =" VBScript的" RUNAT ="服务器">在传统的ASP?

更新时间:2022-06-25 08:57:17

首先你要明白,有一个在路上服务器端的差异剧本标签的处理根据指定的语言是否相同的页的默认语言

First off you need to understand that there's a difference in the way server-side script tags are handled depending on whether the language specified is the same as the default language for the page.

的顺序是这样的: -

The order is this:-


  1. &LT运行的所有脚本;脚本RUNAT,其中指定的语言不匹配的默认语言=服务器标记。这些文件的顺序执行。

  2. 运行默认脚本。这意味着执行隐含写到那里是在页面静态内容(东西不是在 =服务器的响应标记或在&LT ; %%> )和任何中间code在< %%方式> 文档顺序显然再次

  3. &LT发现全球范围内运行的任何code;脚本=服务器标签,其中的语言默认脚本语言相匹配

  1. Run all scripts in <script runat="server" tags where the language specified does not match the default language. These are executed in document order.
  2. Run the default script. That means perform the implied writes to the response where there is static content in the page (the stuff not in runat="server" tags or inside <% %>) and any intervening code in <% %> again in document order obviously.
  3. Run any code at the global level found in <script runat="server" tags where the language matches the default script language.

请注意,所有的脚本具有从第1阶段调用执行阶段1,因此可以通过在第三阶段中运行的脚本来定义将任何可用的函数之前的初始解析。

Note that all script has an initial parse before executing phase 1, hence any functions that may be defined by scripts run in phase 3 will be available for calling from phase 1.