//文章输入限制
function CheckInputOnlyNum(controlid)
{
var regflaotstr = /^\d+(\.\d+)?$/;//验证float
var regnumstr = /^\d+$/;
var temstr = "";
if(window.event.keyCode != 13)
{
//获取键盘输入值
temstr = String.fromCharCode(window.event.keyCode);
}
var valstr = $('#'+ controlid).val() + temstr;
if(!regflaotstr.test(valstr))
{
alert("只能输入数字");
window.event.returnValue = false;
}
else
{
window.event.returnValue = true;
}
}
function CheckInputOnlyNum(controlid)
{
var regflaotstr = /^\d+(\.\d+)?$/;//验证float
var regnumstr = /^\d+$/;
var temstr = "";
if(window.event.keyCode != 13)
{
//获取键盘输入值
temstr = String.fromCharCode(window.event.keyCode);
}
var valstr = $('#'+ controlid).val() + temstr;
if(!regflaotstr.test(valstr))
{
alert("只能输入数字");
window.event.returnValue = false;
}
else
{
window.event.returnValue = true;
}
}