getElementsByName not working in IE for elements created dynamically

It seems a damn one of IE's bugs. When you create element dynamically or insert html into some container like div, cell, getElementsByName doesn't work for them in IE, althoug it works in Firefox.

I spend half day on tracing below code why it not work as my expectation.

Code

 

Finally I had to change it with a workaround method.

Code

 

posted @ 2008-10-08 15:29  octoberfirst  阅读(317)  评论(0编辑  收藏  举报