Created
October 26, 2017 00:06
-
-
Save claudiohilario/727e0eb12d2a214c7ae8bf7a9151ec76 to your computer and use it in GitHub Desktop.
Teste ajax funcional
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
contentType: 'application/json', | |
data: JSON.stringify({"teste":"valor_teste"}), | |
dataType: 'json', | |
type: 'post', | |
url: '<?php echo base_url('registar/teste_json') ?>', | |
success: function (data) { | |
alert(data.modo); | |
}, | |
error: function (data) { | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment