jquery文本框内容改变事件

/**
 * 内容改变时并不会触发事件,但是在失去焦点的时候会触发。
*/
$("#inputid").change(function(){
    console.log($(this).val());
});
/**
 * 只要文本类容发生改变,就会触发该事件
 */
$("#inputid").bind("input propertychange",function(){
    console.log($(this).val());
});

 

posted @ 2016-12-31 15:31  思思博士  阅读(2739)  评论(0编辑  收藏  举报