I'm trying to make a program that takes user input and changes a variable with that input and create an iframe. For example, if the user input was https://google.com it would create an Iframe of Google. Here is my code:
<html>
<input id="url" type="text" placeholder="https://" /><button
onclick="document.getElementById('input').value"
>
<script src=
./script.js></script>
</html>
That is the HTML, and here is the Javascript:
var thing = (document.getElementById('input').value)
function iframe(){ var a,b,c;c="$thing", b=document.createElement("iframe"), b.setAttribute("src",c),b.setAttribute("id","rusic-modal"), b.setAttribute("style","position: fixed; width: 100%; height: 100%; top: -2; left: -2; right: 0; bottom: 0; z-index: 99999999999; background-color: #fff;"), a=document.getElementsByTagName("body")[0],a.appendChild(b)})).call(this)
I don't understand why its not working. I'm decently versed in javascript but I'm no master.