jQuery | Pass url parameters to an iframe
// Iframe Container
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
jQuery(function() {
var oldIframe = jQuery('#iframe');
if (oldIframe.length) {
var src = oldIframe.attr('src');
if (src) {
var iframeContent = $('<iframe id="iframe-new" src="' + src + location.search + '" style="border: none;width: 100%;background-color:#fff;"></iframe>');
oldIframe.replaceWith(iframeContent);
}
}
});
</script>
<iframe id="iframe" src="https://go.domain.com/form.html"></iframe>