OnComplete 事件插入输入值 - jQuery
我有一个问题。
我正在使用 jQuery 插件 Uploadify v. 2.1.4 上传一些 *.pdf 文件。
Uploadify有OnComplete事件回调函数。此事件在您的参数中返回发送的文件名。
我创建了一个带有 id #pdf_name 的隐藏输入,我希望当 oncomplete 函数执行时,他将文件名参数传递给隐藏输入,从而更改您的值。
我不知道如何使用 jQuery 在输入中“插入”一个值。
有人有解决办法吗?
http://www.uploadify.com/documentation/events/oncomplete-2/
谢谢, 路易斯·H.
I have a problem.
I'm using the jQuery plugin Uploadify v. 2.1.4 to upload some *.pdf files.
The Uploadify have the OnComplete event callback function. This event returns in your arguments the file name sended.
I created a input hidden with id #pdf_name, where i want when the oncomplete function executes, him pass the file name argument to the input hidden, changing your value.
I don't know how i can "insert" an value inside a input with the jQuery.
Anyone have a solution?
http://www.uploadify.com/documentation/events/oncomplete-2/
Thanks,
Luiz H.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
试试这个: http://jsfiddle.net/2ZfLG/
try this: http://jsfiddle.net/2ZfLG/
这确实是非常基本的 jQuery:
如果“input id =”#pdf_name”包含 # 符号,您将需要从 id 中删除“#”(建议),或者向 jQuery 选择器添加另一个“#”。
This is really very basic jQuery:
if the "input id = "#pdf_name" includes the # sign you will either need to remove the "#" from the id (suggested) or add another "#" to the jQuery selector.