]<script>
/* 只允许输入数字 */
function numInputCheck(o,m){
var d;
if(',48,49,50,51,52,53,54,55,56,57,96,97,98,99,100,101,102,103,104,105,8,9,13,'.indexOf(',' + event.keyCode + ',')==-1){
event.returnValue=null;
}
if(m!=null){
d = event.keyCode >= 96 ? event.keyCode - 48 : event.keyCode;
if(document.selection.createRange().duplicate().text=='' && (o.value+String.fromCharCode(d))>m){
event.returnValue=null;o.value=m;
}else if(',8,9,13,'.indexOf(',' + d + ',')==-1&&document.selection.createRange().duplicate().text==''&&o.value.indexOf('0')==0){
o.value='';
}
}
}
</script>
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn