xipk2a
Last Updated: February 25, 2016
·
881
· jonabrams
2affdd85d03abf95b16afc744fe33193

Easy access to HTML tags from Chrome's JS Console

In Chrome's JavaScript console, you can quickly access an HTML tag by referring to its ID as if it were a variable.

Given the following HTML snippet:

<div id="sidebar">My sidebar HTML goes here</div>

You can then refer to that div in the console like so:

sidebar.innerText = "Some replacement text"
Say Thanks
Respond

1 Response
Add your response

5562
D42a7264714dee5006b9c99d2567a320

Funny, just like good ol' IE did this)

over 1 year ago ·