日期:2014-05-16  浏览次数:20320 次

JS获取当前对象标签名称
<html>
<script type="text/javascript">
   var demo = document.getElementById("demo");
   var tagName = demo.tagName;
   alert(tagName );
</script>
<span id="demo">I am Here!</span>
</html>