<input type="text" name="aa" onfocus="alert(document.activeElement.name);"> <input type="text" name="bb" onfocus="alert(document.activeElement);"> 提示:您可以先修改部分代码再运行