天天看点

ul li 中判断当前点击的li是哪儿个

$('.clickBtn').live('click',function(){
        	$(this).each(function(){
            	if($(this).hasClass("modify") ){
                	action="modify";
                	}else{
                    	action="add";
                    	}
        		agentpar=$(this).parent().attr('id');
        		var strs= new Array(); //定义一数组
        		strs=agentpar.split("_"); //字符分割 
        		parm='agent_id='+strs[1]+'&parent_id='+strs[2]+'&level='+strs[3]+'&action='+action;
        		$.zxxbox.ajax("/admin/agent/judge-opt-by-param/?"+parm);
            	});
        	}); 
           

继续阅读