Get of 0. TagName gets the action tag sample code

  • 2020-03-30 04:06:17
  • OfStack


<script type="text/javascript" src="jquery1.4.js"></script>
<script type="text/javascript">
$(function(){
$(".test li,.test dd").click(function(){
alert(' Capital itself: ' + $(this).get(0).tagName + 'n using toLowerCase() Convert to lowercase: ' + $(this).get(0).tagName.toLowerCase() + 'n using toUpperCase() Convert to uppercase: ' + $(this).get(0).tagName.toUpperCase());
})
});
</script> <div class="test">
<ul>
<li>lili</li>
<li>lili</li>
</ul>

<dl>
<dd>dddd</dd>
<dd>dddd</dd>
</dl>
</div>


Related articles: