i have this code that shows an html message after the upload, but i want to replace the messages and not accumulate a list of messages like:
valid image invalid image invalid format success upload ....
$('#userfile').change(f开发者_StackOverflow中文版unction() {
$(this).upload('xxx.php', function(res) {
$(res).insertAfter(this);
}, 'html');
});
any idea?
thanks
Use a DIV and replace the content every time
$('#userfile').change(function() {
$(this).upload('xxx.php', function(res) {
$("#someDivID").html(res);
}, 'html');
});
精彩评论