this isn’t really for what the title says, but it’s a good example of what i would like
i would like to have a text box with text you can enter, i then want that to go in a url that you could click on, or an embed
i tried this to embed an image that can change depending on user input
<body>
<input id="testBox1" type="text" >
<button onclick=DisplayText()">Display Text</button>
<p>
<img src=http://verumignis.com/bitmapgen/<div id="displayText"></div>)alt="Circle Image">
</p>
<script>
function DisplayText() {
document.getElementById("displayText").innerText = document.getElementById("testBox1").value
}
</script>
2
Answers
I’ve done it using a tag. All I did was to change the href of the tag to "https://www.google.com/search?q=" and after that the text of the input.
Also, be careful with the typos and the " in your code. It sometimes might cause you some errors.
I made this sample for you. You can make it as your reference.