当单选按钮“否”被选中时,我的下拉菜单仅禁用(灰色)。当没有选择任何东西时如何禁用下拉菜单?颜色和阴影是我的2个下拉菜单的名称。如果没有从单选按钮中选择任何内容,如何禁用下拉菜单
$("input[name^='attendance']").click(function() {
var id = this.name.replace('attendance', '');
$("#colour" + id + ", #shade" + id).prop("disabled", this.value == 'No');
'this'的定义来自哪里? – 2012-03-13 15:00:12