redsos

导航

2007年11月10日 #

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 redsos 阅读(392) 评论(0) 推荐(0) 编辑