function intToChinese ( str ) { str = str+''; var len = str.length-1; var idxs = ['','十','百','千','万','十','百','千','亿','十','百','千','万','十','百','千','亿']; var num = ['零','壹','贰','叁','肆','伍','陆','柒','捌','玖']; return str.replace(/([1-9]|0+)/g,function( $,…