通用的给列表框select赋值的函数,从sql语句提取数据,各位大虾,看看能否在优化一下,虽然成功,但是感觉还不够精简
1.文件comm_combobox.asp(主要存放公用的给列表框初始化函数)
<%
function m_ini_combobox(m_sql)
m_recordset.open m_sql,Connect_DataBase,1,1
do while not m_recordset.eof
response.write "<option>"
response.write m_recordset(0)
response.write "</option>"
m_recordset.movenext
loop
m_recordset.close
end function
%>
2.调用上面初始化函数的例子xxx.asp文件
<!--#include file="../connect_database.asp" -->
<!--#include file="comm_combobox.asp" -->
<html>
<body>
<form name="form1" method="post" action="">
<select name="select1">
<%
call m_ini_combobox("select 姓名 from 教师基本")
%>
</select>
<select name="select2">
<%
call m_ini_combobox("select 序号 from 教师基本")
%>
</select>
<select name="select3">
<%
call m_ini_combobox("select 学历 from 教师基本")
%>
</select>
</form>
</body>
</html>
<%
function m_ini_combobox(m_sql)
m_recordset.open m_sql,Connect_DataBase,1,1
do while not m_recordset.eof
response.write "<option>"
response.write m_recordset(0)
response.write "</option>"
m_recordset.movenext
loop
m_recordset.close
end function
%>
2.调用上面初始化函数的例子xxx.asp文件
<!--#include file="../connect_database.asp" -->
<!--#include file="comm_combobox.asp" -->
<html>
<body>
<form name="form1" method="post" action="">
<select name="select1">
<%
call m_ini_combobox("select 姓名 from 教师基本")
%>
</select>
<select name="select2">
<%
call m_ini_combobox("select 序号 from 教师基本")
%>
</select>
<select name="select3">
<%
call m_ini_combobox("select 学历 from 教师基本")
%>
</select>
</form>
</body>
</html>
...全文
相关推荐
diagrams记录渗透流程.zip
diagrams记录渗透流程图表注释diagrams记录渗透流程
Go包设计本质:编译契约、模块路径与导入逻辑
Go包不是简单的命名空间或代码组织方式,而是一套编译时契约系统,其核心在于模块声明(module)、导入路径(import path)与物理目录结构三者间的严格映射关系。理解这一机制,是掌握Go依赖管理、版本控制和API演化的基础。它决定了go build能否成功、go get能否解析、internal包是否生效,更直接影响代码的可维护性、可测试性与跨团队协作效率。本文深入剖析go.mod初始化规范、import路径的逻辑语义、GOPROXY/GOPRIVATE配置原理,并结合真实工程故障案例,揭示包结构设
攻防画图ICON.zip
攻防画图ICON.zip
网络安全防护系统-漏洞扫描-入侵检测-恶意软件分析-数据加密-防火墙配置-安全策略管理-威胁情报收集-实时监控-应急响应-日志审计-身份认证-访问控制-风险评估-渗透测试-安全培训.zip
网络安全防护系统_漏洞扫描_入侵检测_恶意软件分析_数据加密_防火墙配置_安全策略管理_威胁情报收集_实时监控_应急响应_日志审计_身份认证_访问控制_风险评估_渗透测试_安全培训.zip低功耗设计与锂电池管理
QCS2010_Section 10 - Instrumentation, Control and Automation.zip
Qatar Construction Specifications 2010 (QCS2010)_Section 10 - Instrumentation, Control and Automation


