jquery replace parameter in href
function spin_change(){ var count=$('#n').val(); var href=$('.detail_buy_button a').attr('href'); $('.detail_buy_button a').attr('href',href.replace(/&n=[^&]+/,'&n='+count)); }
function spin_change(){ var count=$('#n').val(); var href=$('.detail_buy_button a').attr('href'); $('.detail_buy_button a').attr('href',href.replace(/&n=[^&]+/,'&n='+count)); }