首页
产品
文档
专题
参考
工具
网址
演示
建站
站内
互联网
判断汉字
if (System.Text.Encoding.GetEncoding("gb2312").GetBytes("中").Length == 2) // C#
if (escape(str).indexOf("%u") < 0) // JavaScript
判断数字
Number.as(v) // ezj
Number.asInt(v) // ezj 判断整数
判断纯数字
Number.asPureNumber(v) // ezj 判断纯数字(不能有正负号、小数点)
System.Text.RegularExpressions.Regex.IsMatch(str, @"^\d+$") // C#
判断闰年
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) // C#、JavaScript
if ((year mod 4 = 0) and (year mod 100 <> 0)) or (n mod 400 = 0) then // ASP
判断页数
int totalPages = ((totalRecords - 1) / pageSize) + 1; // C#
pageCnt = Fix((recordCnt + pageSize - 1) / pageSize) // ASP
版权所有 © 2005 - 2012 千一网络
渝ICP备05010272号
联系我们