jquery操作select标签change事件

xiaoxiao2021-02-28  58

$('#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(''); } });
转载请注明原文地址: https://www.6miu.com/read-2612888.html

最新回复(0)