JqGrid';s添加表单加载保存的用户名和密码

JqGrid';s添加表单加载保存的用户名和密码,jqgrid,Jqgrid,我配置了一个JqGrid,它工作得很好, 但是在Google Chrome中为输入的用户保存用户名和密码时有一个小问题 当输入的用户确认Google Chrome保存他/她自己的密码时,在JgGrid中添加新用户时,保存的用户名和密码将以添加形式加载到他们的输入中 colModel: { name: 'UserName', jsonmap: 'Username', width: 100, editable: true, editoptions: { defaultValue: '' }...

我配置了一个JqGrid,它工作得很好, 但是在Google Chrome中为输入的用户保存用户名和密码时有一个小问题

当输入的用户确认Google Chrome保存他/她自己的密码时,在JgGrid中添加新用户时,保存的用户名和密码将以添加形式加载到他们的输入中

colModel:

{ name: 'UserName', jsonmap: 'Username', width: 100, editable: true, editoptions: { defaultValue: '' }...
                },{ name: 'Password', width: 0, editable: true, hidden: true, edittype: 'password', editoptions: { defaultValue: ''}...
                }
将密码和用户名的defaultValue设置为空字符串无效:

editoptions: { defaultValue: '' }
 beforeShowForm: function (form) {
                    $('#UserName', form).val('');
                    $('#Password', form).val('');}
如果defaultValue不为null,那么它显然可以工作, 此外,此解决方案不起作用:

editoptions: { defaultValue: '' }
 beforeShowForm: function (form) {
                    $('#UserName', form).val('');
                    $('#Password', form).val('');}

任何解决方案都值得赞赏?

这是一个简单的解决方案,只需将“自动完成”属性设置为“关闭”,问题也会得到解决, 代码: