用JAVASCRIPTvar i=Form1.document.activeElement;
if(i.name=="textbox1")
{
代码
}得到活动的控件。