Today, I come to ask for your help on a small javascript problem. how can url work with this jquery
example url
this html and javascript
function GetUrlValue(a) {
var b = window.location.search.substring(1);
var c = b.split('&');
for (var i = 0; i < c.length; i++) {
var d = c[i].split('=');
if (d[0] == a) {
return d[1]
}
}
}
$('#title').html('<h2>' + GetUrlValue('title') + '</h2>');
if (geoip_country_code() == 'TK' || geoip_country_name() == 'Tokelau') {}
else {
if (GetUrlValue('dLink1') == '') {
$('#url1').html('No link')
} else {
$('#url1').attr('onclick', "this.href='" + GetUrlValue('dLink1') + "'")
}
if (GetUrlValue('dLink2') == '') {
$('#url2').html('No link')
} else {
$('#url2').attr('onclick', "this.href='" + GetUrlValue('dLink2') + "'")
}
if (GetUrlValue('dLink3') == '') {
$('#url3').html('No link')
} else {
$('#url3').attr('onclick', "this.href='" + GetUrlValue('dLink3') + "'")
}
if (GetUrlValue('dLink4') == '') {
$('#url4').html('No link')
} else {
$('#url4').attr('onclick', "this.href='" + GetUrlValue('dLink4') + "'")
}
$('#gp').attr('onclick', "this.href='https://play.google.com/store/apps/details?id=" + GetUrlValue('gplay') + "'");
}
$(document).ready(function () {
document.title = ('' + GetUrlValue('title') + '');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script src="http://j.maxmind.com/app/country.js" charset="ISO-8859-1"></script>
<section>
<div id='container_buttons'>
<p>
<a class='a_btn 1' href='#' id='url1' onclick='' rel='nofollow' target='_blank' title='Download'>Download 1</a>
</p>
<p>
<a class='a_btn 2' href='#' id='url2' onclick='' rel='nofollow' target='_blank' title='Download'>Download 2</a>
</p>
<p>
<a class='a_btn 3' href='#' id='url3' onclick='' rel='nofollow' target='_blank' title='Download'>Download 3</a>
</p>
<p>
<a class='a_btn 4' href='#' id='url4' onclick='' rel='nofollow' target='_blank' title='Download'>Download 4</a>
</p>
</div>
</section>