【问题标题】:how to add remove/delete button after upload on swfupload如何在 swfupload 上上传后添加删除/删除按钮
【发布时间】:2011-11-04 18:19:44
【问题描述】:
【问题讨论】:
标签:
php
javascript
upload
swfupload
【解决方案1】:
enter code here考虑 JQuery hide()。它不仅隐藏而且实际上移除了组件,这意味着如果您在相对模式下放置一些东西,例如,该内容将向上移动。
在 html 中:
<button type="button" id="mybutton">Hello</button>
例如,只需像这样放置您的 JQuery。点击后按钮消失:
<script>
$(document).ready(function($){
$('#mybutton').click() { $('#mybutton').hide(); });
});
</script>
【解决方案2】:
试试这个
.bind('uploadSuccess', function(event, file, serverData){
var item=$('#log li#'+file.id);
item.find('div.progress').css('width', '100%');
item.find('span.progressvalue').text('100%');
var pathtofile='<a href="uploads/'+file.name+'" target="_blank" >view »</a>';
item.addClass('success').find('p.status').html('Done!!! | '+pathtofile);
item.remove();//to delete item from Q
})
这可能对你有帮助