05/09/08 12:41:42
>>542 ホレ。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html><head><title>???</title>
</head><body>
<pre><script type="text/javascript">
function add(x, y) {
var z = String(Number(String(x).replace(/,/g,'')) +
Number(String(y).replace(/,/g,''))).replace(/(...)$/, ',$1');
while(/^\d\d\d/.test(z)) z = z.replace(/(...,)/, ',$1');
return z;
}
document.writeln(add('1,111', '11,111,111,111'));
</script></pre>
</body></html>