為什么老版本的不提供下載了,3.3以下版本都沒法用了
使用call或apply是更好的選擇,詳細參考Prototype或MS AJAX代碼。
謝了。
請問有沒有《GCC參考大全》,中文版的。英文名是《GCC, the Complete Reference》McGrawHill著,英文版我有。
對小數部分考慮似乎不周。下面的方法延用了你的方法名,但是查詞典不知道單詞加了-fy成了什么意思,請指教。
String.prototype.commafy = function(){
var _n = this.match(/(-?\d+)(\.\d*)?/);
var __n = _n[1].match(/(-?\d{0,3})((?:\d{3})*)/);
return __n[1] + __n[2].replace(/(\d{3})/g, ",$1") + // integer.
_n[2].replace(/(\d{3})/g, "$1,").replace(/(.*),$/, "$1"); // decimal.
};
Number.prototype.commafy = function(){
return this.toString().commafy();
};
String.prototype.decommafy = function(){
return this.replace(/,/g, "");
};
HOHO,下了,拜讀ING。。。
不錯,雖然仍然很亂。。。
居然不提供下載
垃圾,果然
廣告而已
再次再次垃圾