使用jQuery UI按钮时,我在添加动态radiobutton时遇到了麻烦。谢谢
<script>
$(document).ready(function () {
var myCars = ["01", "02", "03", "04", "05", "06", "21", "22", "07", "08", "09", "10", "11",];
for (var i = 0; i < myCars.length; i++) {
$("#main").append("<input type='radio' id='radio'" + i + " name='radio'>" + "<label for='radio" + i + "'>" + myCars[i] + "</label>");
}
$("#main").buttonset();
});
</script>
答案 0 :(得分:0)