$(document).ready(function(){
$(".role").change(function(){
var userId=$(this).attr('name');
return $("form[id=userId]").submit();
});
})
In the above code, I already checked that 'userId' gets an appropriate value through printing its value through 'alert'. Also, I already checked that $("form[id='1']").submit(); is okay.
However, the above code doesn’t work. I don’t know why.
The string should be concatenated