<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'>
window.onload=function(){
var element = document.getElementById('test');
var result = document.getElementById('result');
result.innerHTML = element.tagName.toUpperCase();
}
</script>
</head>
<body>
<input id="test" type="text"value"hello">
<div id="result"></div>
</body>
</html>