0

Javascript .replace command replace page text?

My apologies if this is not the best way to ask a question in reference to an answered question, but given the above solution, how would I go about replacing more than one word/phrase? Do I just duplicate these lines with additional ones?

    cakeRE = /cake/g,
    replaceValue = "pie";
    tmpnode.nodeValue = tmptxt.replace(cakeRE, replaceValue);

0 Answers0