扩充内置对象功能参考js string扩展方法.pdfVIP

  • 3
  • 0
  • 约3.11万字
  • 约 22页
  • 2024-08-16 发布于北京
  • 举报

扩充内置对象功能参考js string扩展方法.pdf

/**在字符串末尾追加字符串**/

String.prototype.append=function(str){

returnthis.concat(str);

}

/**删除指定索引位置的字符,索引无效将不删除任何字符**/

String.prototype.deleteCharAt=function(index){

if(index0||index=this.length){

returnthis.valueOf();

文档评论(0)

1亿VIP精品文档

相关文档