日期:2014-05-18 浏览次数:21159 次
$(document).ready(function(){ //获取项目下拉框的值(项目编号) var ddlxm=$("#<%=drpXMName.ClientID %>"); ddlxm.change(function(){ $.post( "../ajax/GetHTByObjHandler.ashx", {xmNumber:$('#<%=drpXMName.ClientID %> option:selected').val()}, function(results){ $("#divht").val(results); }),"html"; }) })
context.Response.ContentType = "text/html"; //读取传过来的项目 string xmNumber = context.Request.QueryString["xmNumber"]; HTBLL bll = new HTBLL(); IList<Tb_HTInfo> list = bll.GetHTMessageByObjNumber(xmNumber); StringBuilder sd = new StringBuilder(); sd.Append("<select id=\"ddlHT\"> runat=\"server\""); sd.Append("<option value=\"--请选择--\" selected=\"selected\">--请选择--</option>"); if (list.Count > 0) { for (int i = 0; i < list.Count; i++) { sd.Append("<option value=\""+list[i].Ht_HTnumber+"\" selected=\"selected\">"+list[i].Ht_HTName+"</option>"); } } sd.Append("</select>"); context.Response.Write(sd);