我有以下代码:
$('#modal .update-title')
.change(function () {
var title = $('option:selected', this).prop('title');
$(this).prop('title', title);
// For the question screen, after the initial set up
// changes move the title to the title input field.
if ($(this).data('propagate-title') === 'yes') {
var m = this.id.match(/^modal_TempRowKey_(\d+)$/);
if (m) {
$("#modal_Title_" + m[1]).val(title);
}
}
});
当我运行 jslint 时,它给了我以下错误:
Combine this with the previous 'var' statement.
var m = this.id.match(/^modal_TempRowKey_(\d+)$/);
jslint 错了还是我错了?