html文本框只允许输入数值类型

 时间:2024-10-12 05:46:02

1、下载我提供的JQuery文件,可复制html示例运行

2、启主要作用的代码$('#money').each(function() {$(this).onlypressNumber();//只允许输入数值类型//$(this).onlypressInteger();//只允许输入整数//$(this).onlypressPositiveInteger();//只允许输入正整数});

3、<!doctype html><html><head><m髫潋啜缅eta charset="UTF-8"><title>html文本框只允许输入数值</title><script src='jquery-1.7.min.js'></script><script src='jquery.validate.maximin.js'></script></head><body>金额:<input type='text' id='money' /></body><script>$('#money').each(function() {$(this).onlypressNumber();//只允许输入数值类型//$(this).onlypressInteger();//只允许输入整数//$(this).onlypressPositiveInteger();//只允许输入正整数});</script></html>

  • 解决WordPress时区错误问题的三种方法
  • WordPress怎么设置文章置顶
  • 易语言窗口界面如何添加调节器
  • 用易语言如何通过点击编辑框可以全选内容
  • vue2.0如何嵌套路由?子路由怎么配置?
  • 热门搜索
    小男孩的发型 猛兽博物馆 感冒吃什么水果 动听的近义词 通草怎么吃 男发型短发 优信二手车怎么样 学习情况怎么写 门牙有缝怎么办 sofa怎么读