Replacing Link URL with JavaScript

by Taufik Nurrohman

HTML

<a href="http://www.google.com/">Google</a><br>
<a href="http://mail.yahoo.com/">Yahoo! Mail</a><br>
<a href="http://www.sxc.hu">SXC</a><br>

CSS

body {padding:50px;}

JavaScript

$('a').each(function() {
   $(this).attr('href', $(this).attr('href').replace(/$/g, "?iframe=hompimpaalaihumgambreng.blogspot.com"));
});