vegancheck.me/js/submit.js
2021-08-21 14:48:51 +02:00

19 lines
No EOL
371 B
JavaScript

/**
* @author Philip Brembeck
* @version 0.0.1
*/
$('input[name="submit"]').on('click', function(e) {
e.preventDefault();
$.ajax({
url: 'script.php',
type: 'POST',
data: {
barcode: $('input[name="barcode"]').val()
},
success: function(result) {
$('#result').html(result);
}
});
});