我确实有 5 个同级别的组合。
我想找出其中哪个组合框选择了值 5
我的尝试:
$(document).ready(function($){
previous = 0;
$('.check').focus(function () {
// Store the current value on focus and on change
previous = this.value;
}).change(function() {
// Do something with the previous value after the change
//change previous container with value
newVal = this.value;
//alert(previous);
console.log('Old Val: ' + previous + '- new val:' + newVal);
$lst = $('.ranking option[value=' + newVal + ']:selected');
console.log('one ' + $lst.length);
// Make sure the previous value is updated
previous = this.value;
});
});