function stringbuilder()
{
  this.arr = new Array();
  this.append=function(str)
  {
    this.arr.push(str);
  }
  this.tostring = function()
  {
    return this.arr.join('');
  }
}


var sb = new stringbuilder();
sb.append("hello");
sb.append("doudou");
$("#div1").html(sb.tostring());

相关文章:

  • 2022-12-23
  • 2021-10-24
  • 2022-12-23
  • 2021-12-07
  • 2021-08-09
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-30
  • 2021-08-09
  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案