-4

How can I replace (with jQuery) a text (not element or attribute value) "blahblah" (without quotes) by a new text "sometext" (without quotes)?

pstein
  • 15
  • 3
  • Without any more detail or code, all we can do is point out that this has been answered many times here already, eg https://stackoverflow.com/q/11324559/6089612, https://stackoverflow.com/q/11867269/6089612, https://stackoverflow.com/q/38052211/6089612, https://stackoverflow.com/q/8146648/6089612, https://stackoverflow.com/q/36010608/6089612, ... and many more. If you already did your research and have tried those and they don't help, then you need to edit your question and describe why not. https://stackoverflow.com/questions/how-to-ask, https://stackoverflow.com/help/mcve. – Don't Panic Apr 15 '23 at 08:19

1 Answers1

0

var str = "blahblah";
str = str.replace("blahblah","sometext");
console.log(str);
Roby Raju Oommen
  • 343
  • 2
  • 10