Your Ad Here

Posted By

vasilije on 10/14/08


Tagged

javascritp


Versions (?)

HTMLEncode extend prototype


 / Published in: JavaScript
 

  1. String.prototype.HTMLEncode = function (){
  2. var result = '';
  3. for(var i=0; i<this.length; i++){
  4. result += '&#' + this.charCodeAt(i) + ';';
  5. }
  6. return result;
  7.  
  8. }

Report this snippet  

You need to login to post a comment.