提交动态创建的输入字段的问题 [英] problem submitting dynamically created input field

查看:127
本文介绍了提交动态创建的输入字段的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




i上传文件时遇到问题。

i创建了一个文件类型的输入元素并将其附加到表单。

选择文件后,当我点击提交表格变成空白,我再次需要选择文件。

,它在第二次尝试工作


i无法弄清楚为什么会发生这种情况

请帮助

这里是代码


//main.php



代码:

展开 | 选择 | Wrap | 行号

解决方案




im使用windows xp和ie6。

i上传文件时遇到问题。

i创建了一个输入元素文件类型并将其附加到表单。

选择文件后我点击提交表单变为空白我再次需要选择文件。

和它第二次尝试工作


i无法弄清楚为什么会发生这种情况

请帮助

这里是代码
< br $>
//main.php


代码:

展开 | 选择 | 换行 | 行号


我已经在另一个帖子中问过这个问题

所以请不要回答它。

话题已关闭


道歉


我已合并线程。


原因是元素。点击()行。删除它,它应该工作。


click()无论如何都不适用于大多数浏览器中的输入文件元素。


hi,

i am having problems while uploading a file.
i created an input element of file type and appended it to a form.
after selecting the file when i click on submit the form becomes blank and i again need to select the file.
and it works in the second attempt

i cant figure out why its happening
please help
here is the code

//main.php


Code:

Expand|Select|Wrap|Line Numbers

解决方案

hi,

i m using windows xp and ie6.
i am having problems while uploading a file.
i created an input element of file type and appended it to a form.
after selecting the file when i click on submit the form becomes blank and i again need to select the file.
and it works in the second attempt

i cant figure out why its happening
please help
here is the code

//main.php


Code:

Expand|Select|Wrap|Line Numbers


i have already asked this question in another thread
so please dont answer it.
the topic is closed

apologies


I''ve merged the threads.

The reason for this is the element.click() line. Remove that and it should work.

click() doesn''t work for the input file element in most browsers anyway.


这篇关于提交动态创建的输入字段的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆