2007-12-04から1日間の記事一覧
3桁ごとに区切る - Higé au lait iandeth. - javascriptで数値をカンマ区切り文字列に変換する関数メモとりあえず書いたの。Array#spliceで後ろから三桁ずつ切る。 Number.prototype.split3=function(){ var arr = String(this).split(''), len = Math.ceil(…
3桁ごとに区切る - Higé au lait iandeth. - javascriptで数値をカンマ区切り文字列に変換する関数メモとりあえず書いたの。Array#spliceで後ろから三桁ずつ切る。 Number.prototype.split3=function(){ var arr = String(this).split(''), len = Math.ceil(…