weixin_33670786 2014-10-24 11:46 采纳率: 0%
浏览 16

Ajax表单提交警报

I'm having a problem while submitting a form through AJAX.When I'm clicking submit button the form is submitted successfully but not getting alert.Anyone's help would be greatly appreciated.

$(function () {
$('#register').on('submit',function (e) {

          $.ajax({
            type: 'post',
            url: '',
            data: $('#register').serialize(),
            success: function () {
            alert("Information Submitted");
            }
          });
      e.preventDefault();
    });});

Please tell where I'm wrong?

  • 写回答

0条回答 默认 最新

    报告相同问题?