html底部的布局是用传统的fixed布局
<!--onfocus 的意思是当点击的时候调用getHeight函数-->
<textarea onfocus="getHeight()"></textarea>
复制代码
<script>
function getHeight(){
setTimeout(()=>{//弹起输入键盘的时候,让输入文本框置于输入键盘上面
document.body.scrollTop = document.body.scrollHeight
},300)
}
</script>
复制代码