两个转换函数:parseInt():把值转换成整数parseFloat():把值转换成浮点数也有其他方法,详情请看参考博客,但个人认为转换函数是最好的方法参考文档:1,js、jquery字符串数字比较大小_chorbin_新浪博客http://blog.sina.com.cn/s/blog_4b7b2fc501010xar.html