fileadded.js 554 B

1234567891011121314151617181920212223
  1. $(document).ready(function() {
  2. $("#upload").click(function() {
  3. var upload=$("#upload").val()
  4. var machine = $("#machine").val();
  5. alert(machine);
  6. var file = $("#file")[0].files[0];
  7. alert(file);
  8. $.ajax({
  9. type: 'POST',
  10. url: 'fileadded.php',
  11. data: {upload: upload, file:file},
  12. success: function (msg) {
  13. alert(msg);
  14. $('#messagefile').html(msg);
  15. }
  16. });
  17. });
  18. return false;
  19. });