<input type="text"  />

$('input').on('input propertychange', function() {
  console.log('打印');
});

 

 

延伸知识:

1、回车提交绑定:

标签上添加:onfocus="document.onkeydown = ifFocus" onblur="document.onkeydown = null;"

如:<input type="text" />

相关脚本:

function ifFocus(){
  var e = event || window.event || arguments.callee.caller.arguments[0];
  if(e && e.keyCode==13){
    alert('按了回车');
  }
}

 

相关文章: