为什么 JavaScript 警报不会在 ASP 经典 Select Case 分支中弹出?当我放入 Response.End 语句并运行结帐过程时,JavaScript 警报会做他们的事情。但是当我将它们取出时,它们会立即跟随重定向...警报不会弹出。知道为什么吗?
If strResponse <> "000" Then
Select Case strResponse
Case "701"
%>
<script type="text/javascript">
alert("The customer is under 18 years of age based upon the date of birth.");
</script>
<%
'Response.End
Response.Redirect strRedirectCheckout
Case "702"
%>
<script type="text/javascript">
alert("The billing address is outside the United States.");
</script>
<%
'Response.End
Response.Redirect strRedirectCheckout
Case "707"
%>
<script type="text/javascript">
alert("The account holder does not have sufficient credit available for the transaction amount.");
</script>
<%
'Response.End
Response.Redirect strRedirectCheckout
Case Else
%>
<script type="text/javascript">
alert("Unable to obtain an authorization\nClick OK to be redirected back to checkout and please choose another form of payment");
</script>
<%
'Response.End
Response.Redirect strRedirectCheckout
End Select
Else ' if strResponse does == '000'; SUCCESS!!!