JavaScript 中标准化自定义异常信息。
摘要:sample: 1String.prototype.toChinese = function(){ 2 if(isNaN(this)) throw({description:"非法数字!",number:-1,toString:function(){ return this.description}}); 3 var chinese = "零壹贰叁肆伍陆柒捌玖"; 4 ...
阅读全文
posted @ 2007-11-10 15:00
浙公网安备 33010602011771号