function init()
{
    
    var f=document.forms[0];        var m;
  for (var i=0;i<f.length;i++) {        var e=f.elements[i];
        if (e.type=="text" && e.readOnly==false) {
        
               eval('e.onBlur=FormatDecimalAsNumber(this)');
               eval('e.onKeyPress=EnsureNumeric(event)');
        }
   }
}
在body中加入了onload="init();"
不起作用,哪错了