<script language="javascript" runat="server">
// Checks that the string supplied can be expressed as a number (float)
function isNumeric(strNumber) {
return (strNumber.search(/^(-|\+)?\d+(\.\d+)?$/) != -1);
}
// Checks that the string supplied can be expressed as an unsigned number (float)
function isUnsignedNumeric(strNumber) {
return (strNumber.search(/^\d+(\.\d+)?$/) != -1);
}
// Checks that the string supplied can be expressed as an integer
function isInteger(strInteger) {
return (strInteger.search(/^(-|\+)?\d+$/) != -1);
}
// Checks that the string supplied can be expressed as an unsigned integer
function isUnsignedInteger(strInteger) {
return (strInteger.search(/^\d+$/) != -1);
}
</script>
// Checks that the string supplied can be expressed as a number (float)
function isNumeric(strNumber) {
return (strNumber.search(/^(-|\+)?\d+(\.\d+)?$/) != -1);
}
// Checks that the string supplied can be expressed as an unsigned number (float)
function isUnsignedNumeric(strNumber) {
return (strNumber.search(/^\d+(\.\d+)?$/) != -1);
}
// Checks that the string supplied can be expressed as an integer
function isInteger(strInteger) {
return (strInteger.search(/^(-|\+)?\d+$/) != -1);
}
// Checks that the string supplied can be expressed as an unsigned integer
function isUnsignedInteger(strInteger) {
return (strInteger.search(/^\d+$/) != -1);
}
</script>
相关信息
- 关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 管理登陆
- Copyright © 2003-2007 ZhuYe123.COM. All Rights Reserved . 粤ICP备05072659号
- 致力于中国个人网站发展,我们一直在努力!