-1

I have an iframe with a certian text:

mytext

<iframe src="theURL?mytext" ... />

How can I search for "mytext" and remove it?

Satch3000
  • 47,356
  • 86
  • 216
  • 346
  • You can take a look here http://stackoverflow.com/questions/364952/jquery-javascript-accessing-contents-of-an-iframe – R Pelzer May 04 '16 at 14:52

1 Answers1

1

Use attribute contains selector

$('iframe[src*="mytext"]').attr('src', function(i, oldSrc) {
    return oldSrc.replace('mytext', '');
});
Tushar
  • 85,780
  • 21
  • 159
  • 179