开发者

replace a message and not insertAfter

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');
        });
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜