How Would I Change The Src Of An Iframe With A Text Input?
So, Mojang released a version of Minecraft for the browser and I've been trying to add it to my website. I successfully did that with an iframe but people wanted multiplayer. Since
Solution 1:
Change the existing iframe source:
functionchangeIframe(url) {
document.getElementById('change').src = url;
}
Use the onchange
event instead of onsubmit
:
<inputtype="text"id="minecraftInput" onchange="changeIframe(this.value)"id="detroit" placeholder="https://classic.minecraft.net/?join=somelettersand#s" name="link" required>
Post a Comment for "How Would I Change The Src Of An Iframe With A Text Input?"