Insert into HTML select tag options from a JSON

前端 未结 6 989
南方客
南方客 2021-02-09 14:32

So, here\'s the deal: I have a JSON object saved in my web App at localStorage. This JSON is being saved as a string, with JSON.stringify, inside one of my function

6条回答
  •  北荒
    北荒 (楼主)
    2021-02-09 14:45

    $.ajax({
        url:'test.html',
        type:'POST',
        data: 'q=' + str,
        dataType: 'json',
        success: function( json ) {
            $.each(json, function(i, value) {
               $('#myselect').append($('

提交回复
热议问题