I need to update my page using Anchor (#) in URL
index.php <html> <head> <title>My Title</title> <script type="text/javascript"> function getLink(data) { document.getElementById("box").innerHTML="This is "+data; } </script> </head> <body> <a href="#home" onClick="getLink('Home')">Home</a><br /> <a href="#profile" onClick="getLink('Profile')">Profile</a><br /> <a href="#message" onClick="getLink('Message')">Message</a><br /> <a href="#setting" onClick="getLink('Setting')">Setting</a><br /> <hr /> <div id="box"></div> </body> </html> Output Home Profile Message Setting This is Home As the code says my Div contents updated when i click any of