Javascript String dmFormat()

Description

Javascript String dmFormat()


String.prototype.dmFormat = function(){
    if(this.length === 1){
        return '0'+this;
    } else {//w w w . j  a v  a2s  .c o  m
        return this;
    }
};
String.prototype.decodeHtmlEntity = function(){
    var ta = document.createElement('textarea');
    ta.innerHTML = this;
    return ta.value;
};



PreviousNext

Related