parse xml with jquery ajax request

前端 未结 1 1077
Happy的楠姐
Happy的楠姐 2020-12-21 05:22

I have this xml document:




message 1 


        
1条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-21 05:31

    Try this code:

    $(document).ready(function() {
        $.ajax({
            type: "GET",
            url: "numbers.xml",
            dataType: "xml",
            success: function(response) {
                $('lesson', response).each(function() {
                    $("#dropdownlist").append($('

    You were attaching a change() trigger to your element every time you looped.

    0 讨论(0)
提交回复
热议问题