type: 'POST', url: '/Index/data_add.html', data: {username:_name,tel:_phone,cheben:_type,areaid:city_id_cki,address:_address,page_url:this_page_url,tid:5}, dataType: 'json', success: function(data){ if(data.status == 1) { $.message({ message:data.msg, type:'success' }); $('input[name=name]').val(''); $('input[name=phone]').val(''); $('input[name=address]').val('烟台'); } else { $.message({ message:data.msg, type:'error' }); } }, error: function(){ $.message({ message:'请求失败,请稍后再试', type:'error' }); } }); }); });