jquery ajax(实现单独提交某个form)

function submitTaskScore(formid) {//formid表示的是表单的id
        $.ajax({
            type:"post",
            url:"companyAndDistributeAction!scoreTask",//后台处理程序
            data:$(formid).serialize(),
            success:
                function(){
                    document.getElementById("hjzggContent").innerHTML="<center><h1>评论成功!</h1>
            </center>&nbsp;&nbsp;&nbsp;&nbsp;<a href='allFinishedTask'>返回</a>"; }, error: function(){ alert("评论失败!"); } }); }

 

posted @ 2015-09-03 19:24  hjzqyx  阅读(1472)  评论(0编辑  收藏  举报