时间:2020-12-28 12:59:16 | 栏目:jquery | 点击:次
如下所示:
function changeShipMethod(shipping){ var len = $("select[name=ISHIPTYPE] option").length if(shipping.value != "CA"){ $("select[name=ISHIPTYPE] option").each(function(){ if($(this).val() == 111){ $(this).remove(); } }); }else{ $("<option value='111'>UPS Ground</option>").appendTo($("select[name=ISHIPTYPE]")); } }