简体   繁体   English

在ASP Classic上调用vbscript函数

[英]Calling a vbscript function on ASP Classic

<script language=vbscript>
Public Function testfunc(a)
    MsgBox a
End Function
</Script>    
<%
Call testfunc("hi")
%>

I simplified the code because I am not sure if this would work at all. 我简化了代码,因为我不确定这是否会奏效。 I am trying to use vbscript Function to open "Outlook.application". 我正在尝试使用vbscript函数打开“ Outlook.application”。 I need this to run client side but the asp part should run server side as it queries SQL with Windows.Authentication(IIS App Identity). 我需要它来运行客户端,但是asp部分应该在服务器端运行,因为它使用Windows.Authentication(IIS App Identity)查询SQL。

Is this possible at all or am I missing a point? 这完全有可能还是我遗漏了一点?

Think about this logically. 从逻辑上考虑一下。 Client side means that the code is executed by the browser after the page loads, server side means that it's executed on the server before the page loads. 客户端意味着代码在页面加载后由浏览器执行,服务器端意味着代码在页面加载前在服务器上执行。 The server will ignore your client side code and your browser won't even see your server side code so it won't work 服务器将忽略您的客户端代码,并且您的浏览器甚至看不到您的服务器端代码,因此它将无法正常工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM