<script type="text/javascript">
function getkeycode(e){
var obj = null;
try{obj = event.keyCode;}catch(e1){}
if(obj == null){try{obj = e.keyCode;}catch(e2){}}
if(obj == 13){
var isfocus1 = $(".txt1").is(":focus");
var isfocus2 = $(".txt2").is(":focus");
if(isfocus1){alert("enter_01");}else if(isfocus2){alert("enter_02");}
}
}
document.onkeydown = getkeycode;
</script>
function getkeycode(e){
var obj = null;
try{obj = event.keyCode;}catch(e1){}
if(obj == null){try{obj = e.keyCode;}catch(e2){}}
if(obj == 13){
var isfocus1 = $(".txt1").is(":focus");
var isfocus2 = $(".txt2").is(":focus");
if(isfocus1){alert("enter_01");}else if(isfocus2){alert("enter_02");}
}
}
document.onkeydown = getkeycode;
</script>