ext添加单选按钮列表 如下所示,单选按钮列表如何写?
展开全部
columns : [
{
header : '考勤状态',
dataIndex:'status_num',
width : 250,
renderer : showEdit
}];
function showEdit(name) {
var record=store.getRange();
var cmp=record[index].get('status_num');
if(index<record.length)
index++;
if(index>=record.length)
index=0;
return "<input name='"+index+"' type='radio' value='1' "+(cmp==1?"checked='checked'":"")+">未打卡</input> "
+"<input name='"+index+"' type='radio' value='2' "+(cmp==2?"checked='checked'":"")+">已到</input> "
+"<input name='"+index+"' type='radio' value='3'"+(cmp==3?"checked='checked'":"")+">迟到</input> "
+"<input name='"+index+"' type='radio' value='4'"+(cmp==4?"checked='checked'":"")+">早退</input> "
+"<input name='"+index+"' type='radio' value='5'"+(cmp==5?"checked='checked'":"")+">缺席</input> "
+"<input name='"+index+"' type='radio' value='5'"+(cmp==6?"checked='checked'":"")+">请假</input> ";
};
{
header : '考勤状态',
dataIndex:'status_num',
width : 250,
renderer : showEdit
}];
function showEdit(name) {
var record=store.getRange();
var cmp=record[index].get('status_num');
if(index<record.length)
index++;
if(index>=record.length)
index=0;
return "<input name='"+index+"' type='radio' value='1' "+(cmp==1?"checked='checked'":"")+">未打卡</input> "
+"<input name='"+index+"' type='radio' value='2' "+(cmp==2?"checked='checked'":"")+">已到</input> "
+"<input name='"+index+"' type='radio' value='3'"+(cmp==3?"checked='checked'":"")+">迟到</input> "
+"<input name='"+index+"' type='radio' value='4'"+(cmp==4?"checked='checked'":"")+">早退</input> "
+"<input name='"+index+"' type='radio' value='5'"+(cmp==5?"checked='checked'":"")+">缺席</input> "
+"<input name='"+index+"' type='radio' value='5'"+(cmp==6?"checked='checked'":"")+">请假</input> ";
};
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询