日期:2014-05-16  浏览次数:20343 次

问:当用户在ASP网页中,输入了“用户编码”,如果在网页中自动显示出相对应的“用户姓名”?
本帖最后由 xilaianzxsc 于 2013-09-11 14:50:41 编辑
SQL表:

表名:职员档案  Employee
字段名:EmployeeCode  C型
        EmployeeName  C型


另有下列一段代码

<form id="form1" name="form1" method="post" action="">
  <p>用户编码:
    <label for="yhCode"></label>
    <input type="text" name="yhCode" id="yhCode" />
  </p>
  <p>用户姓名:
    <label for="yhName"></label>
    <input type="text" name="yhName" id="yhName" />
  </p>
  <p>
    <input type="submit" name="button" id="button" value="提交" />
    <input type="reset" name="button2" id="button2" value="重置" />
  </p>
</form>


“用户编码”,即对应SQL表中的EmployeeCode字段
“用户姓名”,即对应SQL表中的EmployeeName字段


问:当用户在ASP网页中,输入了“用户编码”,如果在网页中自动显示出相对应的“用户姓名”?



------解决方案--------------------
用ajax 吧