用 ASP 经典编写 JavaScript

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19704736/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 16:33:12  来源:igfitidea点击:

Writing JavaScript in ASP classic

javascriptasp-classic

提问by Zephram

Is it possible (and how if so) to write JavaScript code directly into an ASP classic file?

是否可以(如果可以的话)将 JavaScript 代码直接写入 ASP 经典文件中?

I want to create validation functions inside an ASP classic file.

我想在 ASP 经典文件中创建验证函数。

回答by MC ND

ASP is a tecnology, NOT a lenguage. You can write your ASP pages in any language which is registered as Scripting Engine. So you can use VBScript, Javascript, Perl, ... if there is a scripting engine registered in your server, you can use it.

ASP 是一种技术,而不是一种语言。您可以使用任何注册为脚本引擎的语言编写 ASP 页面。因此,您可以使用 VBScript、Javascript、Perl ……如果您的服务器中注册了脚本引擎,则可以使用它。

How?

如何?

<%@ Language= "Javascript" %> 
<% 
  var message = 'This is my message: ';
  for (var i = 0, endI = 10 ; i < endI ; i++){ 
      Response.Write( message + ' ' + i + '<br>' ) ;
  };
%>