jquery 取子节点及当前节点属性值的方法

时间:2014-08-24    点击:303   

分享下jquery取子节点及当前节点属性值的方法。

<li class="menulink">
<a href="#" rel="external nofollow" id="101" onclick="changeMenu('101','资料管理','#' )"><span>资料管理</span>
</a>
</li>

取子节点:

$(".menulink a").each(function(){
var id=this.id;
});

取当前节点:

$(".menulink ").each(function(){
var id=this.id;
});
Node.js模块加载详解
JS遍历Json字符串中键值对先转成JSON对象再遍历
手机端网页点击链接触发自动拨打或保存电话的示例代码
在JavaScript中重写jQuery对象的方法实例教程
一个支持任意尺寸的图片上下左右滑动效果
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved