开发者

Why is appended radio button is not clickable?

开发者 https://www.devze.com 2023-03-15 21:15 出处:网络
I have done a small mistake in my code that is not allowing me to click on the appended radio button.

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

精彩评论

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