php - How can I edit an iframe with proxy? -


i need edit iframe jquery i'm unable it.

i tried with:

$(document).ready(function(){     $("#iframe").on('load',function(){         $(this).contents().find('body').html('a');     }); }); 

this code doesn't work.

edit

the iframe related different domain.

you answered own question. code doesn't work because of same origin policy.

you can use php proxy bypass restriction.

<?php     $url = "http://example.com";     $domain = file_get_contents($url);     echo $domain; ?> 

and use information in script.

this question has more details issue.

hope helps!


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -