Jquery ASP表单如果选择了“选择”选项,请更改电子邮件地址

Jquery ASP表单如果选择了“选择”选项,请更改电子邮件地址,jquery,forms,if-statement,asp-classic,Jquery,Forms,If Statement,Asp Classic,我有一个表单,它有一个带有多个不同选项的选择框。如果用户选择某个选项,我需要收件人的电子邮件地址 这里有一些ASP伪代码,我只是需要帮助从我的表单中获取数据。我是否需要使用jQuery/JavaScript来实现这一点,或者是另一种方式 <% Dim selectedoption Dim specialoption if selectedoption="specialoption" then #this would pull data from form varrecipient =

我有一个表单,它有一个带有多个不同选项的选择框。如果用户选择某个选项,我需要收件人的电子邮件地址

这里有一些ASP伪代码,我只是需要帮助从我的表单中获取数据。我是否需要使用jQuery/JavaScript来实现这一点,或者是另一种方式

<% 
Dim selectedoption
Dim specialoption

if selectedoption="specialoption" then #this would pull data from form
varrecipient = "ImSpecial@domain.com" #this would pull data from form

else

varrecipient = "NotSoSpecial@domain.com"

else if

varFormName = "ContactFormName"
varRHBusinessUnit = "Business1"
varLanguage = "ENGLISH"
varCourtesyResponse = "Y"
varRedirect = "#noredir?formRun=true"
varSubject = "Subject of my Form"
%>
表格:


只需使用请求对象。例如,如果您希望使用SCtype select来确定相关的收件人地址,那么您可以使用此选项

<%
If Request.Form("sCType") = "Brand" or Request.Form("sCType") = "Retailer" then
varrecipient = "ImSpecial@domain.com"
Else
varrecipient = "NotSoSpecial@domain.com"
End If
%>

你为什么给我们假代码?为什么不给我们真代码??。使用伪代码传递重要的细节。。。只有一条评论。就像我在帖子中说的,我不知道代码,这就是全部问题。我会根据有多少不同的电子邮件地址使用jQuery,甚至可能使用ajax。你可以在这里寻找一个好的开始:@ControlFreak:OP在使用经典ASP时遇到了问题-JavaScript可能是他们目前最不关心的事情。@Paul我真的不明白OP为什么会使用服务器端代码来生成客户端功能。我知道,但这真的没必要。jQuery不难使用/学习,而且OP在post中有jQuery标记。这可能是为Op选择jQuery的好时机。
<%
If Request.Form("sCType") = "Brand" or Request.Form("sCType") = "Retailer" then
varrecipient = "ImSpecial@domain.com"
Else
varrecipient = "NotSoSpecial@domain.com"
End If
%>