IF I Clicked a button It goes another page and that page content should be hide

Viewed 52

If I Clicked a button It goes another page and that page content should be hidden

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
<button id="oo">hh</button>
<script>
document.querySelector("#oo").addEventListener("click",function()
{
location.href="https://thecareerlabs.com/assam-km?clcp=CLTMCP001";
console.log("pp");
if(location.href=="https://thecareerlabs.com/assam-km?clcp=CLTMCP001")
{
document.querySelector("#explore-prog-microsite").style.display="none";
console.log("oo");
}
});
</script>
</body>
</html>

If I clikced the Button enter image description here

After Clicked its go another page enter image description here

On that page, I want to hide any other content. Example:The Heading Id is -->(explore-prog-microsite) enter image description here

0 Answers
Related