amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bt=BLS&sort=date'; $url = $url + '&keyword=' + $val; } } else { $url = $url + '&keyword=' + $val; } $('a.search_tag').attr('href',$url); })