SHARE
TWEET

ajax

a guest Dec 8th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.     $(document).ready(function() {
  3.         $(".simpan").click(function() {
  4.             var data = $(".form-simpan").serialize("value");
  5.             $.ajax({
  6.                 type: 'post',
  7.                 url: 'admin/simpan.php',
  8.                 data: {
  9.                     "simpan": data
  10.                 },
  11.                 success: function(s) {
  12.                     alert(data);
  13.                     if (s = true) {
  14.                         window.location.reload();
  15.                     }
  16.                 }
  17.             });
  18.         });
  19.     });
  20. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top