这是 Summernote 和 summmernote 编辑器输入,但是当我在输入标记中插入值然后调用输入事件来填充输入值属性时,现在我的问题是,如果我输入“python”,那么我会得到“pytho”。输入事件时不会调用最后一个字符。
下面是我的代码。
输入类是“standardTextbox”
有谁知道这个问题吗
$('body').on('input', '.standardTextbox', function () {
var InValue = $(this).val();
$(this).attr('value', InValue);
});
尝试
onChange
方法,例如
$(document).on('input.change', '.standardTextbox', function() {
var InValue = $(this).val();
// Do something with the complete value
});