hhg-2015

今天项目有这个问题,苹果手机就不行

 
使用keyup事件检测文本框内容:
 $(\'#keyup_i\').bind(\'keyup\', function(){
        $(\'#keyup_s\').text($(this).val()); 
}
本来是上面这种处理方式,现在改成下面这样就ok了 
使用oninput以及onpropertychange事件检测文本框内容:
 //先判断浏览器是不是万恶的IE,没办法,写的东西也有IE使用者
      var bind_name = \'input\';
      if (navigator.userAgent.indexOf("MSIE") != -1){
        bind_name = \'propertychange\';
      }
      $(\'#inputorp_i\').bind(bind_name, function(){
        $(\'#inputorp_s\').text($(this).val());
      }) 
 

分类:

技术点:

相关文章: