<script>
window.onload=function(){
document.getElementById("test").onkeydown=function(e){
//當前元素是(e||event).currentTarget console.log((e||event).currentTarget); //標簽名稱是(e||event).currentTarget.tagName console.log((e||event).currentTarget.tagName);}
}
</script>