Ajax接收后台传递到前台的集合

<script type="text/javascript">
   $.ajax({
            url : "${ctx}/wash/store/racking/queryHandSelect",
            data : {
                "id" : area
            },
            type : "post",
            cache : false,
            dataType : "json",
            error : function() {
                alertx("连接后台失败!");
            },
            success : function(list) {
                 var hongonNum = document.getElementById("hongonNum");
                //清空数组
                hongonNum.innerHTML = "";
                var option1 = new Option();
                hongonNum.add(option1);
                for (var i=0;i<list.length;i++) {
                    var option = new Option(list[i], list[i]);
                    hongonNum.add(option);
                    
                } 
            }
        });
</script>

 

posted @ 2016-05-21 16:20  ▁▁丶小白 ℡  阅读(457)  评论(0编辑  收藏  举报