jQuery.isNumeric()方法
jQuery 教程
· 2019-03-28 21:56:35
实例
判断输入值类型
$(function () {
function fun( html ){
document.body.innerHTML += "<br>" + html;
}
// true
fun($.isNumeric( "-10" ));
fun($.isNumeric( "0" ));
fun($.isNumeric( 0xFF ));
fun($.isNumeric( "0xFF" ));
fun($.isNumeric( "8e5" ));
fun($.isNumeric( "3.1415" ));
fun($.isNumeric( +10 ));
fun($.isNumeric( 0144 ));
//false
fun($.isNumeric( "-0x42" ));
fun($.isNumeric( "7.2acdgs" ));
fun($.isNumeric( "" ));
fun($.isNumeric( {} ));
fun($.isNumeric( NaN ));
fun($.isNumeric( null ));
fun($.isNumeric( true ));
fun($.isNumeric( Infinity ));
fun($.isNumeric( undefined ));
})
定义和用法
$.isNumeric() 函数用于判断指定参数是否是一个数字值。
注意:在jQuery 3.0中,$.isNumeric()方法只有接收number类型的参数,或者是可以被强制为有限数值的 string类型的参数时,才会返回true,否则返回false。
语法
$.isNumeric( value )
参数 | 描述 |
---|---|
value | 任意类型 需要进行判断的任意值。 |
点击查看所有 jQuery 教程 文章: https://www.codercto.com/courses/l/35.html
基于内容图像检索技术
周明全 / 清华大学 / 2007-12 / 28.00元
《基于内容图像检索技术》从理论方法研究与实现技术角度,总结归纳了基于内容图像检索(CBIR)技术的研究与进展,并融入了作者多年来的相关研究与应用成果,系统地介绍了CBIR的主要概念、基本原理、典型方法、实用范例以及新动向。《基于内容图像检索技术》共有12章分为五部分:第一部分是概述,分析了CBIR的体系结构、技术现状和发展趋势;第一部分讨论图像特征提取,给出图像低层特征(颜色、形状、纹理、空间关系......一起来看看 《基于内容图像检索技术》 这本书的介绍吧!
RGB转16进制工具
RGB HEX 互转工具
XML、JSON 在线转换
在线XML、JSON转换工具