html-app 按钮被输入法顶起解决办法总结
原理 根据判断window的高度来选择隐去和显示按钮
android端
var height1=document.body.clientHeight;
$(window).resize(function(){
var height2=document.body.clientHeight;
console.log('height',height1,height2)
if(height2<height1){
$(".bottomButton").css("display","none")
}else{
$(".bottomButton").css("display","")
}
});
ios端
输入法顶起时window的高度不会发生变化,不会出问题