关于判断文本框中是否是数字,并且数字不大于1.0,应该怎样写合适.
文本框的长度限制为3个.
if not isnumeric(request("a1")) then
msg="扣分情况由数字组成!请修改....."
end if
上面是判断是否是数字组成,不过这样写好像不起作用,也不知道对不对.还有对于是否是小于1.0的数字.应该怎样写呢..
文本框的长度限制为3个.
if not isnumeric(request("a1")) then
msg="扣分情况由数字组成!请修改....."
end if
上面是判断是否是数字组成,不过这样写好像不起作用,也不知道对不对.还有对于是否是小于1.0的数字.应该怎样写呢..
if not isnumeric(request("num")) then
msg="扣分情况由数字组成!请修改....."
elseif cint(request("num"))>1.0 then
msg="大于1"
else
msg="小于1"
end if
<%
if not isnumeric(request("num")) then
msg="扣分情况由数字组成!请修改....."
elseif formatnumber(request("num"))>1.0 then
msg="大于1"
elseif formatnumber(request("num"))=1.0 then
msg="等于1"
else
msg="小于1"
end if
%>
[此贴子已经被作者于2007-5-31 9:10:32编辑过]