Javascript 替换消息,而不是插入后面的消息
我有一段代码,在上传后显示一条html消息,但我想替换这些消息,而不是累积一个消息列表,如: 有效图像 无效图像 无效格式 成功上传 有什么想法吗Javascript 替换消息,而不是插入后面的消息,javascript,jquery,Javascript,Jquery,我有一段代码,在上传后显示一条html消息,但我想替换这些消息,而不是累积一个消息列表,如: 有效图像 无效图像 无效格式 成功上传 有什么想法吗 谢谢每次使用DIV并替换内容 $('#userfile').change(function() { $(this).upload('xxx.php', function(res) { $("#someDivID").html(res); }, 'html');
谢谢每次使用DIV并替换内容
$('#userfile').change(function() {
$(this).upload('xxx.php', function(res) {
$("#someDivID").html(res);
}, 'html');
});
$('#userfile').change(function() {
$(this).upload('xxx.php', function(res) {
$("#someDivID").html(res);
}, 'html');
});