标签:
$.fn.onlyNum = function () { $(this).keypress(function (event) { var eventObj = event || e; var keyCode = eventObj.keyCode || eventObj.which; if ((keyCode >= 48 && keyCode <= 57) || ((keyCode == 8 || keyCode == 46))) return true; else return false; }).focus(function () { //禁用输入法 this.style.imeMode = ‘disabled‘; }); };
标签:
原文地址:http://www.cnblogs.com/weixing/p/5886026.html