Add Div Dynamically using JQuery

后端 未结 5 671
庸人自扰
庸人自扰 2021-02-13 09:54

I\'m not sure if this would be the best option.. But I want the option that when the user clicks a button, it will add another div or li.

I am going to allow users to u

5条回答
  •  梦谈多话
    2021-02-13 10:17

    Try this:

    $('.button').click(function() {
        $('#myContainer').append('
    the new guy
    '); });

提交回复
热议问题