开发者

Why is appended radio button is not clickable?

I have done a small mistake in my code that is not allowing me to click on the appended radio button.

var ToBeRadio=NoneElementsArray[i]*1-1;
$(this).children('td:eq('+ToBeRadio+')').find('input:checkbox').hide();
$(this).children('td:eq('+ToBeRadio+')').append("<input type='radio'>开发者_开发知识库");

Where's the error?


You need to give your input type a name attribute. Your code should be similar to:

 var ToBeRadio=NoneElementsArray[i]*1-1;
 $(this).children('td:eq('+ToBeRadio+')').find('input:checkbox').hide();
 $(this).children('td:eq('+ToBeRadio+')').append("<input name='myRadios' type='radio'>");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜