<body>
<iframe width=100% height=100% style="border:none; background: blue;"></iframe>
<script>
var url = window.location.href;
url = url.replace(/a\.com/, "b.com");
url = url.replace(/oopif\.html/, "oopif_frame.html");
document.querySelector('iframe').setAttribute('src', url);
</script>
</body>