为什么TypeError: td_state[i].html is not a function alert(td_state[i].html());
$(function(){vartd_state=$('.td_state');varbutton=$('.reportLoss');alert(td_state.len...
$(function(){
var td_state=$('.td_state');
var button = $('.reportLoss');
alert(td_state.length);
alert(button.length);
for(var i=0;i<td_state.length;i++){
alert(td_state[i].html());
if(td_state[i].html()=="未激活"){
button[i].val('解除挂失');
}else{
button[i].val('挂失');
}
}
}); 展开
var td_state=$('.td_state');
var button = $('.reportLoss');
alert(td_state.length);
alert(button.length);
for(var i=0;i<td_state.length;i++){
alert(td_state[i].html());
if(td_state[i].html()=="未激活"){
button[i].val('解除挂失');
}else{
button[i].val('挂失');
}
}
}); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询