I have some text that I want to change into a link using javascript. I've already figured out the textchanger fuction with a button but then when I put the link in my script section it doesn't recognize it. The link is not a domain but just another html page. Ever so thank you for the help! Greetings.
Asked
Active
Viewed 51 times
-7
-
2[Java != JavaScript](https://stackoverflow.com/q/245062/6634591) – Luca Kiebel Apr 29 '18 at 22:22
2 Answers
0
What about using normal <a>
tag? Or if you are trying to open a link after button click for example, check this http://api.jquery.com/on/

Lukáš Václavek
- 442
- 1
- 6
- 12
-
2You don't need jQuery, especially not, if you don't even know how to generate links – Luca Kiebel Apr 29 '18 at 22:26
0
You can use the temple string
const link = `<a href="Your LINK HERE">Your TEXT here</a>`

Evil-Coder
- 11
- 1
- 4