<form id="formData" method="post" action="${pageContext.request.contextPath }/save">

    <input type="button" value="确认提交" class="tj-btn" id="tj">

</form>

<script type="text/javascript">

    $('#tj').click(function(){

        checkSubmit();

        $.ajax({

            type: 'POST',

    url: '${pageContext.request.contextPath }/save',

    data: $('#formData').serialize(),

    dataType:'json',

    success: function(data){

        if(data.result==1){

            $('#formData')[0].reset();

            alert('提交成功');

                 checkSubmitFlg = false; 

}else{

    alert(data.errorMessage);

    checkSubmitFlg = false; 

}

    },

    dataType: 'json'

})

    });

    var checkSubmitFlg = false;   

    function checkSubmit() {     

        if (!checkSubmitFlg) { 

     checkSubmitFlg = true;     

     return true;  

        }else{

     alert("不能重复提交");

     return false;

        }

    }


</script>