Hello everyone i have a google blog and we post many pages in my blog.

and we add a div like <div id='header'> .
the header div show all of the pages but i want to show my header only main page.
and hide all of other pages using a java script.
if anyone open my site 'www.myblogsite.blogspot.com/'
the <div id='header'> unhide
if the the visitor visit another page then hide <header>
please help.

I think you can use window.location and check if .com is at the end of the url.

butt how to do this ?
we need a code.
please anybody give me the code
i am awaiting a good response

Text questions will most likely attract text answers. If you want code, then provide code.

No thank you. i do resolve it now.
We have solved the problem myself.

i am so happy because we join java language before one day.but i did that..
Where you could not helped us.there my God helped us .
Thanks God Thanks Alot.
But pritaeas and Airshow thanks for reply .

we share this code for who people was could not do this.
goto this site and check script online .

<!DOCTYPE html>
/*this is your div tag class. if you want to change div class you can change it */
color: violet;
/*End div tag class*/

<script stype="text/javascript">
var mysiteurl = location.host;
var newurl = 'www.w3schools.com';

if( newurl==mysiteurl ){
alert('url was match')
document.getElementById('demo').style.display = "show";
}else {
alert('url was not match')
document.getElementById('demo').style.display = "none";

<div id="demo">This my div tag value so we want to hide.</div>


We have solved the problem myself.

That's cool Razamughal67, well done.