Javascript setAttribute() in IE6
Posted by admin on
September 30, 2008
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'; link.href = 'javascript://'; link.setAttribute('onclick', 'myfunc()');
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.







2 Responses to “Javascript setAttribute() in IE6”
one time i am going to ask you something about programming. will you be able to spend time to answer my questions
Ester’s Money Journal
Ester’s Recollections
By my daily thoughts on Oct 1, 2008
anytime
By tech on Oct 1, 2008