Guest User

ajax

a guest
Dec 8th, 2019
110
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