I have a question about anchor tags and javascript. Convert url to anchor tag
The text box accepts a URL (for example, "www.youtube.com")
I made a Javascript function that adds the "http: //" link to the link.
How to do this so that the conversion button adds a link to a web page that will lead 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; }
source share