私のHTMLコードは
<table>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
</table>
私のJQueryコードは(私が書いたものではありません。Stackoverflowを使用することで助けてくれました。彼に感謝しています)
$('TABLE TBODY TR').each(function()
{
var lastd = $(this).children('tr td:last').find('input:checkbox');
var parentlast = lastd.parent();
lastd.remove();
parentlast.append("<input type='radio'>"); // want to add the same properties of the removed checkbox
});
誰か助けてください。