如何添加新列表而不替换列表 [英] How to add new list not to replace the list
本文介绍了如何添加新列表而不替换列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个列表,当用户添加新列表时,该列表将增加.当前,当用户单击添加按钮时,它将用新的替换旧的,我要保留旧的值,并在用户单击添加按钮时添加新的值.
I have a listing, which this list will increase when the user add new. Currently, when user click add button, it will replace the old one with the new one, I want to remain the old value, and add the new value when user click Add button.
我知道这部分要做什么,但是我不知道如何去做.请帮助,谢谢.
I know something to do at this part, but I don't have any idea on how to do it. Please help, thanks.
if(radio == '1'){
$( "#summary" ).html( "<li class='holi'>Every Week</li>" );
}
推荐答案
您需要使用 .append().
$( "#summary" ).append( "<li class='holi'>Every Week</li>" );
这篇关于如何添加新列表而不替换列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文