javascript - How to get HTML element similar to getting BODY with document.body? -


I know there is a way to do this, but how can I not remember?

How can I go about grabbing the HTML element (top-most element DOM) using plain javascript?

Use document.documentElement .

View Docs:

Comments

Popular posts from this blog

php - Creating canonical URLs with custom route-classes -

Mysql Local server hardware -

mysql - Formatting problem with PHP DateTime Difference when used as part of an equation -