当前位置:首页 >> 网络编程

如何根据用户银行帐户余额的多少进行显式的提交或终止?

<%@ transaction = required %>
<%
response.buffer = true

' 缓存输出,以显示不同的页面.
%>
<html>
<body>
欢迎使用千花飞舞之在线银行服务.
<%
set bankaction = server.createobject("myexample.bankcomponent")
bankaction.deposit(request("acctnum"))
%>
<p>您的提交的事务已进入处理中...</p>
</body></html>
<%
' 处理成功则显示此页面.
sub ontransactioncommit()
response.write "<html>"
response.write "<body>"
response.write "恭喜,您的帐户已经存入."
response.write "</body>"
response.write "</html>"
response.flush()
end sub
%>
<%
' 处理失败则显示此页面.
sub ontransactionabort()
response.clear()
response.write "<html>"
response.write "<body>"
response.write "对不起,未能完成您的提交操作!"
response.write "</body>"
response.write "</html>"
response.flush()
end sub
%>