文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>对于数字的判断02

对于数字的判断02

时间:2009-04-09  来源:guoguo-beijing2008

<script language="javascript" type="text/javascript">
    
function yanzhengshuzi(str,idname){
        var num=str.length;
        for(i=0;i<num;i++){
                var strend=str.substring(i,i+1);
                if(strend<'0' || strend>'9')
                {
                    document.getElementById(idname).value=str.substring(0,i);
                    str=document.getElementById(idname).value;
                }
        }
}
</script>
<html>
<form>
    <input type="text" id='money' name="money" onkeypress="checkNum(this.value,'money')">
</form>
</html>

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载