zoukankan      html  css  js  c++  java
  • * 输入框被第三方输入法遮挡问题

    $("input").bind('focus',function(){

    var ua = navigator.userAgent.toLowerCase();
    if(/android/.test(ua)){
    var height = (window.screen.height-50)/2;
    var inputHeight = $(this).offset().top;
    //$(".btn-right").css('margin-bottom','30px');
    try{
    myScroll.refresh();
    }
    catch(err){

    }
    if(inputHeight > height){
    height = height-50;
    // var thisPage = window.location.href.indexof("ocr.html")!=-1;
    // if(!myScroll){
    // $(".content-article").css('margin-bottom',height + 'px');
    // $(".content").scrollTop(height);
    // }else{
    $(".iscroll>div").last().css('margin-bottom',height + 'px');
    setTimeout(function(){
    try{
    myScroll.refresh();
    myScroll.scrollTo(0,height,300,true);
    }
    catch(err){

    }

    },300);
    // }
    }
    }

    });

  • 相关阅读:
    Promise、Async、await
    Generator
    模块化
    继承
    原型
    == vs ===
    深浅拷贝
    this
    nodejs中搭建服务器
    sql中constraint主要是增加约束
  • 原文地址:https://www.cnblogs.com/yongwang/p/7543682.html
Copyright © 2011-2022 走看看