//---表单提交----
$("#destiation_form").submit(function(){ var from_city_value=$("#from_city").val(); if(from_city_value.indexOf('MFM')>0){ $("#to_city").attr("value",""); } var to_city_value=$("#to_city").val(); if(from_city_value==''){ //显示提示错误信息 return false; }else if(to_city_value==''){ //显示提示错误信息 return false; }else{ return true; } });