首页 > 其他 > 详细

get(0).tagName获得作用标签

时间:2014-07-07 08:04:25      阅读:452      评论:0      收藏:0      [点我收藏+]

<script type="text/javascript" src="jquery1.4.js"></script>
<script type="text/javascript">
$(function(){
    $(".test li,.test dd").click(function(){
        alert(‘本身为大写:‘ + $(this).get(0).tagName + ‘\n利用toLowerCase()转换为小写:‘ + $(this).get(0).tagName.toLowerCase()  + ‘\n利用toUpperCase()转换为大写:‘ + $(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>

下载地址:点击这里

get(0).tagName获得作用标签,布布扣,bubuko.com

get(0).tagName获得作用标签

原文:http://www.cnblogs.com/waitingbar/p/3822317.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!