zoukankan      html  css  js  c++  java
  • 移动端文本框会被挡住处理

    var h = $(window).height(),
    mcss = $(".banner2-con").css("margin");
    window.onresize=function(){
    if( $(document.activeElement).hasClass("banner2-year")) {
    if($(window).height()<h){
    $(".banner2-con").css("margin","0 auto 3.2rem");
    }else{
    $(".banner2-con").css("margin",mcss);
    }
    }else if($(window).height() == h){
    $(".banner2-con").css("margin",mcss);
    }
    }; 
    //year输入框回车事件,fix andorid keyboard next button bug
    $('#txtyear').keydown(function(e) { 
    //tab or enter event
    if (e.keyCode == 9 || e.keyCode == 13) { 
    e.preventDefault();
    $('#btnConfirm').click();
    $(this).blur();
    } 
    });
  • 相关阅读:
    元组类型
    字符串类型
    列表类型
    python 循环
    python语句
    python运算符
    python1
    软件管理
    rpm yum
    LVM
  • 原文地址:https://www.cnblogs.com/tangbuluo/p/8205413.html
Copyright © 2011-2022 走看看