问题
Is there a way of forcing every link to open in an iframe? I have control of some of the websites I want to show but not others. I am willing to use php or javascript.
Thanks
回答1:
You can use jQuery:
$(document).ready(function(){
$('a').attr('target', 'iframeNameHere');
});
Here little sample.
来源:https://stackoverflow.com/questions/14002867/how-to-force-all-links-to-open-in-iframe