Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/270.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
Php 带有查询字符串的Jquery ajax上传程序_Php_Jquery_Ajax - Fatal编程技术网

Php 带有查询字符串的Jquery ajax上传程序

Php 带有查询字符串的Jquery ajax上传程序,php,jquery,ajax,Php,Jquery,Ajax,我使用以下插件上传进度条 在我的html表单中,我使用了floowing <input type="file" id="1550" name="1550" class="flupload" /> <input type="file" id="1552" name="1552" class="flupload" /> 但是使用($(this.attr(“Id”)时,不会在此处检索该Id 如何在此处获取当前id 请帮助。您的ID不是有效的html ID。改为使用自定义的数

我使用以下插件上传进度条

在我的html表单中,我使用了floowing

<input type="file" id="1550" name="1550" class="flupload" />
<input type="file" id="1552" name="1552" class="flupload" />
但是使用($(this.attr(“Id”)时,不会在此处检索该Id

如何在此处获取当前id


请帮助。

您的ID不是有效的html ID。改为使用自定义的
数据
属性,如下所示:

<input type="file" data-id="1550" name="1550" class="flupload" />

您的id无效,不能以数字开头。所以试着先改变它们。。。或者改用
(并相应地获取
pid
值)。确定。我已将id更改为其他名称test_1550。但现在也无法检索。每次使用
$(this).attr(“id”)
时,都应该有人踢你
upload_url: "upload_logo_file.php?pid="+($(this).attr("id")), 
<input type="file" data-id="1550" name="1550" class="flupload" />
upload_url: "upload_logo_file.php?pid="+$(this).data("id"),