var str='QWER';//替换WE
newstr=replacepos(str,1,2,'XX');
console.log(newstr);//QXXR;
function replacepos(text,start,stop,replacetext){
        mystr = text.substring(0,stop-1)+replacetext+text.substring(stop+1);
        return mystr;
}

 

相关文章:

  • 2022-02-05
  • 2021-07-25
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2021-09-05
  • 2021-09-10
  • 2022-02-05
猜你喜欢
  • 2022-12-23
  • 2021-11-25
  • 2021-12-05
  • 2022-12-23
  • 2022-02-09
  • 2022-02-21
相关资源
相似解决方案