Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(function() {
- $('#btn-masuk').on('click', function(e){
- e.preventDefault()
- var email = $(this).data('email')
- $.ajax({
- type: 'POST',
- url: '<?= base_url('home/masuk'); ?>',
- dataType: 'json',
- data: { email: email },
- success: function(respon){
- if(respon.error == false){
- var rec = respon.data
- $('#email').val(rec.email)
- } else {
- alert(respon.message)
- }
- },
- error: function(error){
- console.log(error.responseText)
- }
- })
- })
- })
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement