In below I want to pass a variable value from one page to other using url redirection. But in my variable I have multiple url, so that when I click on particular url only that url value will store and redirected.
<script src="jquery-1.11.3.js"></script>
<script>
$(document).ready(function(){
$('a').click(function(e){
e.preventDefault();
var clk=$('#fkt').attr('href');
var clk=$('#snd').attr('href');
var clk=$('#amz').attr('href');
//alert(clk);
window.location='http://www.shopeeon.com?ver='+clk;
});
});
</script>
<a id='fkt' href="http://www.google.com">Google</a><br/>
<a id='snd' href="http://www.yahoo.com">Yahoo</a><br/>
<a id='amz' href="http://www.rediff.com">Rediff</a><br/>
In my case it will only take last URL link and stored in clk variable.
$(this).attr('href')in theclickhandler