标签:ajax
<!-- 表单ajax提交方法 -->
<script type=‘text/javascript‘>
jQuery(document).ready(function(){
jQuery(‘form‘).submit(function(){
jQuery.ajax({
type:‘post‘,
dataType:‘json‘,
data:jQuery(‘#activityform‘).serialize(),
url:‘/admin/activity/edit?aid=‘+{{$activity->aid}},
success:function(data){
if(data == 1){
alert(‘success‘);
}else{
alert(‘failure‘);
}
location.href = ‘/admin/activity/manage‘;
}
})
})
})
</script>
标签:ajax
原文地址:http://blog.csdn.net/huihuangjiuai/article/details/43952593