网站地图
首页
php教程
asp.net教程
手机开发
css教程
网页制作
办公数码
jsp教程
asp教程
ps教程
当前位置:
编程学习网
>>
网页制作
>
jquery
> >
[jquery ajax]jquery 只允许输入数字的示例
[jquery ajax]jquery 只允许输入数字的示例
发布时间:2018-11-08
【www.gdgbn.com--jquery】
提示:您可以先修改部分代码再运行
jquery
只允许输入数字的示例
<script src="lib/
jquery
-1.3.2.js" type="text/javascript"></script> <script type="text/javascript"> $.fn.numeral = function() { $(this).css("ime-mode", "disabled"); this.bind("keypress",function() { if (event.keyCode == 46) { if (this.value.indexOf(".") != -1) { return false; } } else { return event.keyCode >= 46 && event.keyCode <= 57; } }); this.bind("blur", function() { if (this.value.lastIndexOf(".") == (this.value.length - 1)) { this.value = this.value.substr(0, this.value.length - 1); } else if (isNaN(this.value)) { this.value = ""; } }); this.bind("paste", function() { var s = clipboardData.getData("text"); if (!/D/.test(s)); value = s.replace(/^0*/, ""); return false; }); this.bind("dragenter", function() { return false; }); this.bind("keyup", function() { if (/(^0+)/.test(this.value)) { this.value = this.value.replace(/^0*/, ""); } }); }; </script>
<script type="text/javascript"> $("#txt1").numeral(); </script>
提示:您可以先修改部分代码再运行
本文来源:
http://www.gdgbn.com/wangyezhizuo/25853/
上一篇:
[密码强度检测 jquery]密码强度检测
下一篇:
【jquery ajax】jquery 获取 cookie值代码
相关推荐
非主流卡通图片可爱_非主流可爱性感美女大图片
【php随机生成数字】5种php生成swf 文件代码
免费的|免费50g php/mysql/ftp/无广告空间
asp.net core_asp.net 获取 CheckBoxList值的方法
php多文件上传_php入门级文件上传代码
【非主流情侣壁纸】2010最新非主流情侣图片
[javascript学习指南]javascript 繁体中文转换代码
【韩国网站】韩国免费1g/全能/mssql/mysql/ftp/可绑米/无广告空间
[密码强度检测 jquery]密码强度检测
asp.net core_asp.net c 匹配绝对地址的图片格式
网友关注
【ajax简单与ajax php实例应用程序】ajax简单与ajax+php实例应用
【asp.net core】asp.net 模似http请求代码
[外国id免费]外国免费300m/10g/php/mysql/ftp/个人主页空间
【htaccess图片防盗链】.htaccess图片防盗链
【asp.net core】asp.net C连接oracle数据库并显示数据
[photoshop分辨率怎么调]利用Photoshop调出外景人物照片柔和的粉红色非主流效果
[站内优化过程中关键词]站内优化过程中关键因素分析
精美的什么_精美css搜索框代码
【photoshop分辨率怎么调】利用Photoshop调出人物图片非主流古典青黄色效果教程
【json】js Date函数的格式化
热门标签
jquery获取select选中的值
最新jquery
jquery
【jquery ajax】jQuery validate 表单验证使用方法
jquery
jquery ajax|jQuery LigerUI 插件 ligerTree 使用与简介
jquery
[jquery ajax]jquery 返回顶部、图片比例缩小、验证元素是否存在
jquery
[jquery ajax]jquery ui插件实现漂亮弹出对话框方法
jquery
jquery ajax_jquery inArray()函数详解
jquery
jquery ajax_jquery eq 与 get使用方法
jquery
[jquery ajax]jquery 弹表单提示效果代码
jquery
jquery ajax_jquery 动态演示各种排序实例代码
jquery
jquery ajax|jquery load 中文乱码解决方法
jquery
jquery ajax|jquery 仿淘宝商城左侧导航效果代码
jquery热门文章
jque
【jquery ajax】jquery 获取 cookie值代码
jque
【实用jquery操作手册】实用jquery操作表单元素代码
jque
jquery获取设置下拉菜单值增加下拉菜单|jquery获取设置下拉菜单值,增加下拉菜单元素,清空下拉框内容
jque
jquery获取复选框的值_jquery读取复选框值
jque
[jquery ajax]jQuery (function($){...})(jQuery)的详细说明
jque
【图片缩放比例在哪里】jquery图片等比例缩放程序
jque
【jquery ajax】jquery $.ajax json数据传递方法
jque
【jquery ajax】jquery JSON的解析方式
jque
未利用地_利用jQuery getJSON 处理json数据的实例
jque
【未利用地】如何利用jquery 实现表格的简单筛选
声明:本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
Copyright©2006-2019 编程学习网 www.gdgbn.com 版权所有