Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/269.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用AJAX上传不起作用,表单数据为空_Javascript_Php_Jquery_Ajax - Fatal编程技术网

Javascript 使用AJAX上传不起作用,表单数据为空

Javascript 使用AJAX上传不起作用,表单数据为空,javascript,php,jquery,ajax,Javascript,Php,Jquery,Ajax,我试图使上传工作,但由于某种原因,表格数据到服务器文件给我空 表格编号: <form id="uploadxlsx" name="uploadxlsx" enctype="multipart/form-data"> <div class="form-group"> <label>Excel File:</label> <input name="excelfile" id="excelfile" class="form-co

我试图使上传工作,但由于某种原因,表格数据到服务器文件给我空

表格编号:

<form id="uploadxlsx" name="uploadxlsx" enctype="multipart/form-data">
  <div class="form-group">
    <label>Excel File:</label>
    <input name="excelfile" id="excelfile" class="form-control" data-rule-required="true" data-msg-required="Choose File" type="file">
  </div>
  <div class="form-group">
    <button type="button" name="submit" class="btn btn-primary" onclick="sendFile();">Upload</button>
  </div>
</form>
当转储服务器窗体作用域时,我得到

这是请求标题图像

http://prntscr.com/gsjc3n

提交表单将加载新页面。。。如果您不想这样做,您可能想阻止提交的默认操作我修复了它,感谢这是我愚蠢的错误我实际上调用了表单字段而不是表单本身提交表单加载新页面。。。如果您不想这样做,您可能想阻止提交的默认操作我修复了它,感谢这是我愚蠢的错误我实际上调用的是表单字段,而不是表单本身
http://prntscr.com/gsjc3n