anchor - Html page does not redirect for different location hash value -
in page, have site menu using anchor:
<ul> <li><a href="/default.aspx#map">map</a></li> <li><a href="/default.aspx#doc">document</a></li> </ul>
and in default.aspx
check hash
of current location load right value.
however found not work expected.
for example, current page url http://server/default.aspx
then click doc
link, not redirect.
but if change url http://server/default.aspx#doc
, hit refresh
button, redirected document page.
what problem?
btw, menu not used in page of default.asxp
other pages. can not use <li><a href="#map">map</a></li>
.
so not using simple anchor links, use javascript determine content loaded hash
of location
.
the # means you're linking somewhere in page, link never refresh page @ place browser try find <a name="what_is_after_the_hash"></a>
, take it. if want refresh page you'll have use ? @ place of # , variables query strings.
Comments
Post a Comment