Hi Ying,
Someone else had the same problem as you in this group but I cannot find the post.
I do remember the issue, though.
With Internet Explorer, Selenium "sees" the alert as belonging to the parent window when showModalDialog was used and the child window calls alert. This is either unreported or unfixed.
Try selecting the parent window or selecting the root window by calling Select Window with no arguments before trying to handle the alert.
Kevin