Home JQuery Ajax , why in success i have error why?
Reply: 0

JQuery Ajax , why in success i have error why?

user426
1#
user426 Published in June 22, 2018, 11:31 am

Why in success I have error?

$('#ck').click(function() {
  var StudentData = [{
    'Name': 'Ali',
    'Age': 27
  }, {
    'Name': 'Sam',
    'Age': 32
  }];

  $.ajax({
    url: "/Home/StudentInfo",
    data: JSON.stringify(StudentData),
    ...
    success: function(response) {
      alert(response[0].Name);
    },
    error: function() {
      alert("error");
    },
  });
});
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.333313 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO