求大神看一段js代码, 解释下定义下拉框那段代码的意思。怎么定义下拉框的改变事件 20
colNames:["用户名","密码","权限","区域"],colModel:[{name:'userName',index:'userName',width:100...
colNames: ["用户名", "密码", "权限", "区域"],
colModel: [
{
name: 'userName', index: 'userName', width: 100, editable: true,
editrules: { required: true }
},
{
name: 'password', index: 'password', hidden: true, editable: true,
editrules: { required: true, edithidden: true }
},
{
name: 'roleName', index: 'roleName', width: 100, onchange: change(this.value), editable: true, edittype: 'select',
editoptions: {
dataInit: function (elem) {
$.ajax('UserManage.aspx/GetRoleSelect', {
type: 'post',
contentType: "application/json;charset:utf-8",
success: function (data) {
var s = '';
$(data.d).each(function () {
s += '<option value="' + this.value + '">' + this.text + '</option>';
});
$(elem).html(s);
$(elem).attr('name', 'roleName');
selectedRole = 'roleName';
$(elem).multiselect({ multiple: false, selectedList: 1 });
}
});
}
}
}, 展开
colModel: [
{
name: 'userName', index: 'userName', width: 100, editable: true,
editrules: { required: true }
},
{
name: 'password', index: 'password', hidden: true, editable: true,
editrules: { required: true, edithidden: true }
},
{
name: 'roleName', index: 'roleName', width: 100, onchange: change(this.value), editable: true, edittype: 'select',
editoptions: {
dataInit: function (elem) {
$.ajax('UserManage.aspx/GetRoleSelect', {
type: 'post',
contentType: "application/json;charset:utf-8",
success: function (data) {
var s = '';
$(data.d).each(function () {
s += '<option value="' + this.value + '">' + this.text + '</option>';
});
$(elem).html(s);
$(elem).attr('name', 'roleName');
selectedRole = 'roleName';
$(elem).multiselect({ multiple: false, selectedList: 1 });
}
});
}
}
}, 展开
2013-12-05
展开全部
下拉框为true就选中了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询