asp强制(人数/性别/日期)型的写法

来源:百度知道 编辑:UC知道 时间:2024/06/15 02:16:02

人数用整型
性别用bool型吧?

那用一个判断语句
日期是
if not IsDate(变量名) then response.write("错误提示")
人数
if not IsNumeric(变量名) then response.write("错误提示")
性别
if 变量名<>"男" or 变量名<>"女" then response.write("错误提示")