<html>
<head>
<script type="text/javascript">
var t1=document.getElementById("txt1");
function isFocus(){
if(document.activeElement.id=='txt2'){
alert('txt2获得焦点');
}
else{
alert('txt2未获得焦点');
}
}
</script>
</head>
<input id="txt1" type="text" value="aaaaa" onblur="isFocus()">
<input id="txt2" type="text" value="bbbbb">
<input id="txt3" type="text" value="cccc">
</html>