Friday, 6 September 2013

Modify content of iframe element in html page with javascript [on hold]

Modify content of iframe element in html page with javascript [on hold]

I want to edit the src attribute of an iframe in javascript.
The iframe looks like:
<iframe name="dynamic_id" src="some url" ></iframe>
How can I edit the src attribute? I can not access it by fetching the html
element via selectors and .attr('src').
Javascript:
$('.facebookshare-box iframe').attr('src');
This prints nothing with console.log();
Why down-voted 3 times and closed? I added the info regarding Javascript.

No comments:

Post a Comment