Advertisement
Guest User

ajax

a guest
Dec 8th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement