The replace function doesn't change the string, it returns the modified version of the string. You want...
ans = ans.replace(...);
On Sat, May 31, 2014 at 1:37 PM, <spjurewicz@gmail.com> wrote:
This replace isn't working:var ans = "<math xmlns='http://www.w3.org/1998/Math/MathML' display='block'><mrow><mtext id='carat'>|</mtext></mrow></math>";
ans.replace("<mtext id='carat'>|</mtext>", "<mfrac><mrow><mtext id='carat'>|</mtext></mrow><mrow><mn>3</mn></mrow></mfrac>");Any ideas?Thanks!--
You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javascript-information+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javascript-information+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.