I want to send a single input form value to Database with JQuery in Laravel.
Here is the Input Field :
     <input type="text" id="comment">
     <button id="cmntSubmit" type="button">Post</button>
Here is my jquery code:
  $(document).on("click","#cmntSubmit",function(){
      var cmnt = $("#comment").val();
  $.ajax({
      url: "",
      data: cmnt,
      success: success,
      dataType: dataType
          });
How will I send this comment field with JQuerry to my Laravel Controller and receive the comment field value with $request ?
via Chebli Mohamed
 
Aucun commentaire:
Enregistrer un commentaire