IE系ではsetAttributeでイベントハンドラを設定できない

idやname等は設定できるがイベントハンドラは無理みたい。

解決方法

if(IE系なら)
{
	hogeElement.setAttribute("onclick", new Function( "o_hoge.hoge()" ) );
}
else
{
	hogeElement.setAttribute("onclick", "o_hoge.hoge()" );
}

setAttributeの第二引数をnew Function()ではさめばおk。