求整数:parseInt(1.1);
字符串中是否包另一字符串:a.indexOf(b)>=0;
验证是否正整数(详参正则表达式一文http://www.cnblogs.com/shanqian/archive/2007/12/04/981967.html):
var reg=/^\d+$/g;
        if ( str.match(reg)== null)
        {
             alert("未匹配!");               
        }  
        if(!reg.test(str)
        {
            alert("未匹配!");
        }



相关文章:

  • 2021-12-15
  • 2021-06-25
  • 2022-03-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-18
猜你喜欢
  • 2021-12-13
  • 2022-12-23
  • 2022-01-11
  • 2021-06-02
  • 2021-10-23
  • 2021-11-15
  • 2022-02-07
相关资源
相似解决方案