ASP网页表单中,如何获取文本框的值并赋值给变量,在表单同一页面上以这个变量为条件完成数据库Select?
<scriptlanguage="javascript"type="text/javascript">functiongetbh(){if(document.formxl...
<script language="javascript" type="text/javascript">
function getbh() {
if (document.formxl.wj_sbbh.value !="CG") {
var pbh=document.formxl.wj_sbbh.value;
} else return
return true;
}
}
</script>
<%
set rs2=server.CreateObject("adodb.recordset")
sql = "select sb_name from sb where sb_bh like '%"&pbh&"%'"
rs2.open sql,conn,1,1
dim pname
pname=rs2("sb_name")
sql = "select * from gz where gz_sb like '%"&pname&"%'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%> 展开
function getbh() {
if (document.formxl.wj_sbbh.value !="CG") {
var pbh=document.formxl.wj_sbbh.value;
} else return
return true;
}
}
</script>
<%
set rs2=server.CreateObject("adodb.recordset")
sql = "select sb_name from sb where sb_bh like '%"&pbh&"%'"
rs2.open sql,conn,1,1
dim pname
pname=rs2("sb_name")
sql = "select * from gz where gz_sb like '%"&pname&"%'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询