Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using more div in my page. when I click the anchor tag.. I want to show the Particular Div..
Posted
Comments
Herman<T>.Instance 15-Feb-12 4:38am    
maybe show code and better explain your problem

You can use JavaScript,

C#
function Show()
{
document.getElementById('divid').style.display='block';
}

<a onclick="Show()"></a>
 
Share this answer
 
Comments
Member 8393790 15-Feb-12 5:28am    
Thank u for a reply.
Syed Salman Raza Zaidi 15-Feb-12 5:37am    
Marked it as answer
XML
I Got that..
1) Name the Target
Choose the exact spot you want to send your link to, choose and element near it (a div, header tag, paragraph.. whatever as long as it's in the right spot), add id="something", you can call them anything you like as long as the names are the same in the link and the target ID and preferably no spaces (spaces change to %20 in the address bar and look a tad messy).

An example would look like this:
<div id="whatever-you-want-to-call-it">
The content of your div here.
</div>

2) Link To Your Anchor Target
To link to your anchor simply use:
<a href="#whatever-you-want-to-call-it">Link Text Here</a>

or if it's on another page:
<a href="pagename.html#whatever-you-want-to-call-it">Link Text Here</a>
 
Share this answer
 
Comments
AmitGajjar 15-Feb-12 5:33am    
please use pre tag whenever required.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900