20130528

1   toFixed() 方法可把 Number 四舍五入为指定小数位数的数字。eg:var num = new Number(13.37);    13.4

2   多个字典的转换  

function renderClassify(rowId, rowData) {
         var result = rowData[4];
         var flag = true;
         jQuery.each(dicItems0, function(i, n) {
             if (rowData[4] == n.dicCode) {
                 result = n.dicValue;
                 flag = false;
             }
   });
   if (flag) {
          jQuery.each(dicItems1, function(i, n) {
              if (rowData[4] == n.dicCode) {
                  result = n.dicValue;
              }
    }); 
   }
         return result;           
        }

posted @ 2013-05-28 10:02  学无先后 达者为先  阅读(141)  评论(0编辑  收藏  举报