移动端设置定时器设置高度弹出框高度
2017-06-19 本文已影响0人
小丶枫
var clock = setInterval('timer()',1000);
function timer(){
if(window.innerHeight <= window.clientHeight){
document.getElementsByClassName('layui-m-layerchild')[0].style.height = (window.innerHeight) + 'px';
}else{
document.getElementsByClassName('layui-m-layerchild')[0].style.height = (window.clientHeight) + 'px';
clearInterval(clock);
}
}