JS 拼接select

<script>   
       function send() {  
            var id = $("#cate").val();  
            $.ajax({  
                type: 'post',  
                url: "__MODULE__/Trainnd",  
                data: {id: id},  
                success: function (data) {  
                    //清空第二个select,解决无法显示BUG  
                    $("#list").empty();  
                        $.each(data, function (i) {  
                            $("#list").append("");  
                        });  
                },  
                dataType: 'json'  
            });  
        }  
script>  

你可能感兴趣的:(JS 拼接select)