**page1.html**
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
document.querySelector(".example").style.backgroundColor = "red";
}
</script>
**page2.html**
<h2 class="example">A heading with class="example"</h2>
The background color of the h2 tag with class named example won't change after clicked the button in page 1.