怎么把从webservice里获得的xml值给html的下拉菜单..?在线等..!!
怎么把从webservice里获得的xml值给html的下拉菜单..?
[解决办法]
function add_select(){
$.post("../../../../AddXiangmu.asmx/SelectOnexm", function (xml) {
var se = "";
var i = 0;
$(xml).find('OP_NAME').each(function () {
sel += "<option>" + $(this).text() + "</option>"
});
/*$(xml.find("Table1").each(function (i) {
se += "<option>" + $(xml).find("OP_NAME").text() + "</option>"
i++;
}))*/
$("#tw").find('select').html(se);
})
}