From 08fe7ee42abbcae5e19934cbc107680233462bf5 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 14 Mar 2014 13:32:10 +0900 Subject: [PATCH] =?UTF-8?q?number=5Fformat=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EB=B6=80=ED=98=B8=20=EC=B2=98=EB=A6=AC=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/common.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/common.js b/js/common.js index 5c53df501..c5df66328 100644 --- a/js/common.js +++ b/js/common.js @@ -70,6 +70,11 @@ function number_format(data) var comma = ','; var i; + var sign = data.match(/^[\+\-]/); + if(sign.length) { + data = data.replace(/^[\+\-]/, ""); + } + len = data.length; mod = (len % cutlen); k = cutlen - mod; @@ -88,7 +93,7 @@ function number_format(data) } } - return number; + return sign[0]+number; } // 새 창