<script type="text/javascript"> var xmlHttp; function createObj() { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); function handler() { if(xmlHttp.readystate==4) { if(xmlHttp.status==200) { document.getElementById("sp").innerHTML =xmlHttp.responseText ; //alert(xmlHttp.responseText); } } } function myChange() { var strName=document.getElementById("j_sfz").value; createObj(); xmlHttp.onreadystatechange = handler; xmlHttp.open("get","dedeCX.aspx?name="+escape(strName),false); xmlHttp.send(null); } </script>
if (!IsPostBack) { if (Request.QueryString["j_sfzName"] != null && Request.QueryString["j_zkzName"] != null) { string str_sfz = Request.QueryString["j_sfzName"].ToString(); string str_xm = Request.QueryString["j_zkzName"].ToString(); DataTable dt = Dede_Select(Server.UrlDecode(str_sfz),Server.UrlDecode(str_xm)); if (dt.Rows.Count > 0) { //Response.Write("<table><tr><td>"); StringBuilder sbStr = new StringBuilder(); sbStr.Append("<table style='border:solid 1px #000000'><tr><td style='border:solid 1px #000000'>姓名:</td><td style='border:solid 1px #000000'>"+dt.Rows[0]["f_name"].ToString()+"</td><td style='border:solid 1px #000000'>性别:</td><td style='border:solid 1px #000000'>"+dt.Rows[0]["f_sex"].ToString()+"</td></tr>"); sbStr.Append("</table>"); Response.Write(sbStr.ToString()); } else { Response.Write("暂未查到,请拨打**进行咨询!"); } }原文链接:https://www.f2er.com/ajax/166241.html