gothle
gothle
  • 发布:2016-09-28 16:10
  • 更新:2016-09-28 16:10
  • 阅读:1686

关于mui-radio

分类:MUI
mui

用户在进行提交操作的时候,我需要知道用户选中了那个单选框,我该如何去写?
$(this).checked==true和$(this).attr("checked")好像都判断不了

document.getElementById('submit').addEventListener('tap', function() {
$("input[type='radio']").each(function() {
console.log($(this).checked==true);
console.log($(this).attr("checked"));
if($(this).attr("checked")) {
var id = $(this).attr("id");
console.log(id);
}
});
});

2016-09-28 16:10 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复