You can read here about the behaviour of attributes in many different browsers, including IE.
element.setAttribute()
should do the trick, even in IE. Did you try it? If it doesn't work, then maybe
element.attributeName = 'value'
might work.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…