我无法找到网络上的多文档
I couldn't find much documentation on the web
到目前为止现在,明显的区别似乎是你不能使用混合的脚本标记的HTML和VBScript
so far now, the obvious difference seems to be that you cant mix html and vbscript using the "script" tag
例如,这是确定
<% public sub display_literal() %> literal <% end sub %>但与脚本标记你应该
but with the script tag you should
<script language="vbscript" runat="server"> public sub display_literal2() response.write "literal2</br>" end sub </script>此页面上
www.newobjects/pages/ndl/ ALP / ASP-structure.htm
它说,
在传统的ASP写在页面的默认脚本语言脚本(即假设在&lt语言;%%>标签)的第二执行 - 例如上述&lt所有的脚本code;%%>标记毕竟在&lt初始化; SCRIPT RUNAT = SERVER ...>脚本。
In classic ASP the script written in the default script language for the page (i.e. the language assumed for the <% %> tags) is executed second - e.g. all the script code in <% %> tags is initialized after all the <SCRIPT RUNAT=SERVER ...> scripts.
但我做了一些测试,无法验证它...
but I made a couple of tests and couldn't verify it...
我这么问是因为我有一个脚本(我没有它在现在手),使用&LT;%%>给了我一个错误,将其更改为在&lt; script>标记解决了这个问题,但我想知道为什么....
I'm asking because I had a script (I don't have it at hand right now) that using <% %> gave me an error, changing it to the <script> tag solved the problem, but I'd like to know why....
反正,我想,我们应该使用在&lt; SCRIPT>的函数和过程标记,将被来自以下的调用;?%%>标签...权
anyway, I guess that we should use the <script> tag for functions and procedures that are to be called from <% %> tags... right?
推荐答案首先你要明白,有一个在路上服务器端的差异剧本标签的处理根据指定的语言是否相同的页的默认语言
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阶段调用执行阶段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.
更多推荐
什么是之间和LT的差异;%%GT;和&lt; SCRIPT LANGUAGE =&QUOT; VBScript的&QUOT; RUNAT =&QUOT;服务器&
发布评论