title: how can i get alert of data submitted successfully from using servlet,js,html,mysql remote server?
body: <p>Below is my code, I want to handle the response send by server, That is data submitted successfully: I want to make an alert prompt data submitted successfully if it is in correct form<br>
      </p>
  
  <pre><code>&lt;script src="js/jquery.serializeJSON.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form name="myform" id="myform"&gt; 
  &lt;div class="form-group"&gt;
  &lt;label for="fullName"&gt;Name:&lt;/label&gt;
  &lt;input type="text" name="fullName" class="form-control"&gt;
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
  &lt;label for="email"&gt;Email:&lt;/label&gt;
  &lt;input type="email" name="email" class="form-control"&gt;
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
  &lt;label for="subject"&gt;Subject:&lt;/label&gt;
  &lt;input type="text" name="subject" class="form-control"&gt;
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
  &lt;label for="mark"&gt;Mark:&lt;/label&gt;
  &lt;input type="number" name="mark" class="form-control"&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  &lt;button type="submit" class="btn btn-success "     id="submitform"&gt;Submit&lt;/button&gt;
  &lt;script&gt;
  $(document).ready(function(){
  $("#submitform").click(function(e)
  {
  var MyForm = JSON.stringify($("#myform").serializeJSON());
  console.log(MyForm);
  $.ajax(
  {
  url : "&lt;your url&gt;",
  type: "POST",
  data : MyForm,
  });
  
  });
  });
  &lt;/script&gt;
  </code></pre>