jQuery— Populate select from json

前端 未结 8 1574
花落未央
花落未央 2020-12-08 01:56

I have a map in my java sevlet and converting it to a json format that works right.

When I do this function below it creates a drop down, but it puts every character

8条回答
  •  春和景丽
    2020-12-08 02:16

    I believe this can help you:

    $(document).ready(function(){
        var temp = {someKey:"temp value", otherKey:"other value", fooKey:"some value"};
        for (var key in temp) {
            alert('');
        }
    });
    

提交回复
热议问题