This problem was solved for a whole afternoon, and I finally took it down. Below, the editor will share my credits to make a backup, and hope it can help everyone.
The specific details are as follows:
$(function(){ var stu_no = freeUrl();var data, subname="",data2;var sbList = new Array();$.ajax({ async: false ,dataType: "json",contentType: "application/json",type: "post",url: "../../control/student/stuMain.asmx/findAllSubject",data:"{"+"'stu_no':'"+stu_no+"'}",success: function (response) {data2 = eval(response.d);$.each(data2, function (i) {$("<option value='" + i + "'>" + data2[i].Account name + "</option>").appendTo(".selectpicker");});$('.selectpicker').selectpicker({//I assign values to all selectpicker operations at one time. If you want to assign values separately, it's OK, then assign values like this: //appendTo("#editcolor .selectpicker"), and so on, cover a div on your select element, //Use the div id to mark the selectpicker you want to operate, that is, the select element you want to operate. Style: 'btn-info', size: 8})}})The above is a related introduction to the Bootstrip's select control binding data that the editor introduced to you. I hope it will be helpful to you!