forum

home / developersection / forums / how to replace a word in a string using jquery?

How to replace a word in a string using JQuery?

Anonymous User 2209 31-Oct-2014
I've tried using replaceAll and replaceWith and they don't seem to work

for example, string

"~/Foo.aspx?fn=/image.jpg&p=True"

I want to do is replace p=True with p=False

var previewSource = "~/Foo.aspx?fn/image.jpg&p=True"
var loadedSource = $(previewSource).replaceAll("p=True").replaceWith("p=False");


Updated on 31-Oct-2014

I am a content writter !


Message
Can you answer this question?

Answer

1 Answers

Liked By