怎么判断输入的不是数字啊?在线等
我写了下面这段代码,怎么判断buy_num,即购买的数量不是数字啊,急,在线等:-_-)<html>
<head><title>订票</title></head>
<body bgcolor="yellow" background="banner.jpg" topmargin="1">
<table border="0" cellspacing="0" style="border-collapse: collapse; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-width: 1; border-bottom-width: 1; border-top-style:solid" bordercolor="#006D91" width="496" bgcolor="#EFEFEF" align="center" height="1">
<%=now%>
<%
dim var_name
var_name=request.form("input_name")
dim var_num
var_num=request.form("input_num")
dim var_train_num
var_train_num=request.form("buy_num")
'response.write"" & var_num1 &""
dim Conn
Set Conn=Server.CreateObject("ADODB.Connection")
dim Strconn
Strconn="Driver={SQL Server};Server=10.1.40.110;Uid=teacher;Pwd=123;DataBase=test"
Conn.open Strconn
sql="insert into total_info(train_number,ticketnum,buyer)values('" & var_train_num & "','"& var_num &"','" & var_name & "')"
dim a
Conn.execute sql,a
if a=1 then
response.write "订票成功!"
else
response.write "更新失败!"
end if
%>