这是您的解决方案:
<script type='text/javascript' src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script type="text/javascript">
// extend jQuery Ajax and change it
$.extend({
getValues: function(url, qs) {
var result = null;
$.ajax({
url: url,
type: 'post',
data: qs,
async: false,
success: function(data) {
result = data;
}
});
return result;
}
});
$(function(){
$("#country_select").change(function(){
var country = $("#country_select").val();
$(".price_content a").attr("href","signup.php?pack="+$.getValues("encrypt.php",{q:'2'})+"&country="+$.getValues("encrypt.php",{q:country}));
});
})
</script>
<select name="country_select" id="country_select">
<option value="">Select country</option>
<option value="IND">India</option>
<option value="SL">Sri Lanka</option>
<option value="PAK">Pakistan</option>
</select>
<div class="price_content"><a href="">Click</a></div>