XX
- xx
- xx
- xx
- xx
- xx
- xx
- xx
- xx
- xx
- xx
- xx
- xx
------------------------jQuery代码如上面
回复讨论(解决方案)
如上所示 点击某一个
$("li").click(function(event){ alert($(this).parent().prev().attr("id"));});
$("li").click(function(event){ alert($(this).parent().prev().attr("id"));});不行,这个方法 没有得到
$("li").click(function(event){ alert($(this).parent().prev().attr("id"));});不行,这个方法 没有得到
test <script src="http://jquery.cuishifeng.cn/js/jquery-2.1.4.min.js?v=20160120"></script><body>XX
- xx
- xx
- xx
- xx
- xx
- xx
- xx
- xx
- xx
- xx
- xx
- xx