i want to focus a particular portion of a web page after redirecting the page(redirected page=again original page) for that how to write a code using javascript
<a href="http://......" />
<script type="text/javascript">
</script>
i want to focus a particular portion of a web page after redirecting the page(redirected page=again original page) for that how to write a code using javascript
<a href="http://......" />
<script type="text/javascript">
</script>
You should use id'd anchors and fragment identifiers.
Any URL can contain fragment identifiers like #section1 in the example below.
http://www.example.com/mypage.html#section1
That would cause the page to scroll this anchor into view:
<a id="section1">Section 1</a>
Here's a live example of that behavior:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.1.1
Have you tried combining a href to take you to another page with the href to take you to another egment within the same page? For example -
<a href="http://targetsite.com/targetpage.html#target-element">Link text</a>
The above will take you to the target page http://targetsite.com/targetpage.html and the element identified using id = "target-element"
.
Is this what you are trying to do?