Reputation: 2201
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";
Upvotes: 14
Views: 39248
Reputation: 449435
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.
Upvotes: 8