Jquery href anchor value

后端 未结 4 617
小蘑菇
小蘑菇 2020-12-21 18:38

I am having an anchor link in aspx page like:

Go
<
4条回答
  •  误落风尘
    2020-12-21 18:45

    You can get the specific query parameter of url by using following code:

    Javascript

    
    

    and here is the usage of this function:

    alert(getAnchorValue('Anchor', 'myTag'));

    JQuery

    
    

    Usage:

    alert($.getAnchorValue('myTag', $('#Anchor').attr('href')));

    EDIT: I have editted my answer and also added the jquery code for getting the querystring parameter

提交回复
热议问题