当前位置: 代码迷 >> 综合 >> 监听input text中内容发生变化时触发事件
  详细解决方案

监听input text中内容发生变化时触发事件

热度:6   发布时间:2024-01-21 00:34:55.0

依赖jquery类库

$(function(){

  if($.browser.msie){
     document.getElementById('start_time').attachEvent("onpropertychange",inputChange);
  }else{
     document.getElementById('start_time').addEventListener("input",inputChange,false);
 }

});


/**需要实际进行的操作**/

function inputChange(){

 alert(1);

}

??
  相关解决方案