4

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

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

4

1 回答 1

10

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

How? Like this!

<%@ Language= "Javascript" %> 
<% 
  var message = 'This is my message: ';
  for (var i = 0, endI = 10 ; i < endI ; i++){ 
      Response.Write( message + ' ' + i + '<br>' ) ;
  };
%> 
于 2013-10-31T13:25:34.633 回答