jQuery3.0 写法:
$('#input').on('input propertychange', function(e) {
e.stopPropagation();
// $('#content').html($(this).val().length + ' characters');
$("#hint_li").addClass("active-visible");
});
js 兼容写法(input同时监听以下两个事件):
oninput(IE9+、现代浏览器) & onpropertychange(IE9以下)
Brief summary:
两个事件同时监听才能保证兼容,注意输入法为半角输入状态,在input 的type=“number”时全角不能输入数字。