JS问题 <input type="checkbox" value="${role.userid}" checked="checked" onclick="removeRole(${listRole.roleId},${role.userid},${role.username});"/>${role.username}
function addRole(roleId,userid,username){ $("#"+userid).remove();//alert($("#"+userid).val()); $(“#fenpeirenyuan”).append('<input type="checkbox" value="'+userid+'" checked="checked" onclick="removeRole('+roleId+','+userid+');"/>‘+userid+’'); }
为啥添加了 usernamen 浏览器就会提示 提示 Uncaught ReferenceError:XXXX is not defined
XXXX为${role.username} 的传值
不加${role.username} username 可用