I have a question about anchor tags and javascript.Converting a URL to an anchor tag
The text box accepts a url (eg. "www.youtube.com")
I made a Javascript function that adds "http://" to the link.
How do I make it so the convert button adds a link on the webpage that takes you to the website in another tab.
My Javascript code is as follows:
var webpage="";
var url="";
var message="";
var x= 0;
var page="";
function convert()
{
url=document.getElementById("link").value;
webpage = "http://" + url;
}
target
attribute which addresses the OP's question about opening in another tab, nice! – Footprint