Not all cases of the setAttribute() function work in IE6. Take the case of a sample code below
link = document.createElement('a');
link.innerText = 'remove';
link.textContent = 'remove';
When you click on the link element labeled ‘removed’, it will not work. Later versions of IE do work as well as Mozilla browsers. If you did this kind of code, it would be better for you to write the whole element tag in a span or div’s innerHTML.