Append List values using JQuery

后端 未结 3 1050
小蘑菇
小蘑菇 2021-01-23 01:15

using JQuery append how to push list values to another div section on button click

For example:

I have two list values

1.Adam  

2.Lance
         


        
3条回答
  •  时光取名叫无心
    2021-01-23 01:51

    I think that you could use this:

    $(document).ready(function() {
        $("button").click(function () {
            $("#sortable").append('
  • '+$(this).prev('label').text()+'
  • '); }); });

    Demo: https://jsfiddle.net/oa2hfLum/4/

提交回复
热议问题