Insert into HTML select tag options from a JSON

前端 未结 6 1792
甜味超标
甜味超标 2021-02-09 14:18

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 15:07

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

提交回复
热议问题