Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.strreplace = function(searchstr,replacestr){
- var ind = this.value.indexOf(searchstr);
- var newstr="";
- var temp = replacestr;
- var lastind = ind + searchstr.length;
- for(var i =0;i<ind;i++)
- newstr+=this.value[i];
- newstr += replacestr;
- for(var j = lastind;j<this.strlen;j++)
- newstr+= this.value[j];
- return newstr;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement