So there is this webpage:
(所以有这个网页:)
<body class="" style="overflow: hidden;">
<div> <!-- stuff --> </div>
<div class="AbCde Zy1XW ">
<!-- unwanted crap -->
</div>
</body>
I want to remove class="AbCde Zy1XW "
and style="overflow: hidden;"
(我想删除class="AbCde Zy1XW "
和style="overflow: hidden;"
)
from body
so I used this code:(从body
所以我用下面的代码:)
d=document
e=d.getElementsByClassName("AbCde Zy1XW ")[0];
e.parentNode.removeChild(e);
document.querySelector('body').removeAttribute('style');
It works but the problem is that the scrolling of the webpage is buggy on iOS.
(它可以工作,但问题是在iOS上网页的滚动存在问题。)
You have to zoom in and out before you can scroll normally.(您必须先放大和缩小,然后才能正常滚动。)
But after a while, you can't scroll anymore and need to do the zoom out/zoom in trick again.(但是过了一会儿,您将无法滚动,需要再次进行缩小/放大技巧。)
Any ideas why?(有什么想法吗?)
Thanks(谢谢)
EDIT:(编辑:)
Using remove();
(使用remove();
)
also has this same issue...(也有同样的问题...)
ask by wolnavi translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…