可以这样理解么
$(function(){
$("span").each(function(index){
if(index==1){
$(this).attr("class","red");
}
});
//$(this) 当前的那一个选中的元素 (index==1) ?
});
$(function(){
$("span").each(function(index){
if(index==1){
$(this).attr("class","red");
}
});
//$(this) 当前的那一个选中的元素 (index==1) ?
});
2015-04-14
举报