//数字转成汉字表示
Number.prototype.toCn=function(){
var arrs=["零","一","二","三","四","五","六","七","八","九"];
var arrt=["","十","百","千","万","亿"];
var arr=[];
var unit=-1;
var _this=this;
while(_this!=0){
arr.unshift(arrt[unit++]);
var number=_this%10;
arr.unshift(arrs[number]);
_this=Math.floor(_this/10);
}
return arr.join('');
}
alert(new Number(12005).toCn());