【发布时间】:2012-12-05 16:29:46
【问题描述】:
这是我正在使用的脚本。
$('.row').each(function(){
$(this).each(function(){
if($(this).find('.name').val()==""){
$(this).find('.name').val(data.name);
$(this).find('.autonomy').val(data.autonomy);
$(this).find('.purpose').val(data.purpose);
$(this).find('.flow').val(data.flow);
$(this).find('.relatedness').val(data.relatedness);
$(this).find('.challenge').val(data.challenge);
$(this).find('.mastery').val(data.mastery);
$(this).find('.colour').val(data.colour);
done=true;
}
if(done==true){
alert("here");
return false;
}
});
});
它似乎完全忽略了 return false,我似乎无法弄清楚为什么!
【问题讨论】:
-
为什么会有两个
.each()? -
确实是这个问题!当天晚些时候解决了:)