var iframe = document.createElement('iframe'); iframe.src = 'https://bidder.dp.direct/banner/m_728x90_s6/index.html?exit=https%3A%2F%2Fwww.directproducteur.com%2F'; iframe.width = 728; iframe.height = 90; iframe.frameborder = 0; iframe.scrolling = "no"; iframe.vspace="0"; iframe.hspace="0"; iframe.marginheight="0"; iframe.marginwidth="0"; var thisScript = document.scripts[document.scripts.length - 1]; var parent = thisScript.parentElement; parent.insertBefore(iframe, thisScript.nextSibling);