How do I set the text of an anchor tag in javascript? This does not seem to work. I'm using firefox.
var link = document.createElement("a");
link.innerHtml = "Remove";
                It is innerHTML. JavaScript is case sensitive.
Property names are case sensitive in Javascript.
Try
link.innerHTML = "Remove";
You will need to attach the created element to the document, too. But I assume you're doing that in the rest of your code.
innerHtml should be innerHTML (capitalized 'HTML')
The property name is case sensitive and should be innerHTML.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With