javascript - js upload problem

WBOY
Release: 2016-10-17 09:30:12
Original
1052 people have browsed it

javascript - js upload problem

These small blocks are generated through the add button below. If it is a form, it is fine. Now I am in trouble.
The upload button is a plug-in written in js and must be rendered before it can be used. If it is appended using append, the button cannot be used. Yes, is there any way to solve it?

Reply content:

javascript - js upload problem

These small blocks are generated through the add button below. If it is a form, it is fine. Now I am in trouble.
The upload button is a plug-in written in js and must be rendered before it can be used. If it is appended using append, the button cannot be used. Yes, is there any way to solve it?

jquery on method:

<code>$("body").on("click", '上传按钮的id或类名', function(){
    // 触发上传事件
});</code>
Copy after login

Using js to implement, the principle is to monitor the click event of the body, and trigger the event when event.traget is the target.


I actually don’t quite understand what you mean when you say that the upload button is a plug-in written in js. I temporarily think that clicking the button will call this plug-in. If not, please describe it in more detail.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template