用attr属性获取
$(".mepj").click(function(){ //$(".mepj") 表示给所有class为mepj的元素都设置onclick事件 var str=$(this).attr("id"); var arr=str.split("_");});