原生js解决方案
var h = document.body.scrollHeight; window.onresize = function(){ if (document.body.scrollHeight < h) { document.getElementById(‘btn‘).style.display = ‘none‘; }else{ document.getElementById(‘btn‘).style.display = ‘block‘; } };
2022-06-17 03:15:25
原生js解决方案
var h = document.body.scrollHeight; window.onresize = function(){ if (document.body.scrollHeight < h) { document.getElementById(‘btn‘).style.display = ‘none‘; }else{ document.getElementById(‘btn‘).style.display = ‘block‘; } };