$('#update_supply_id').on('change',
function(){
//判断是否选取prompt属性,无返回值;
if($(
this).val()){
var selectText = $(
this).find('option:selected'
).text();
var index = selectText.indexOf('-'
);
var price = selectText.substring(index+1
);
$('#price_buy'
).val(price);
}else{
$('#price_buy').val(''
);
}
});