⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _codehelp.asp

📁 ASP程序实现的科技期刊系统
💻 ASP
字号:
<!--#include file="../Include/TimeOut.asp"-->
<!--#include file="../Include/AdoConn.asp"-->
<!--引入数据库连接模块-->
<%
	
	dim objrec         'recordset对象
	dim strsql         'sql语句
	dim table_name     '数据表名
	dim Pname		   '接收的父元素名
	
	set objres=server.CreateObject ("adodb.recordset")
	table_name=Request.QueryString("table_name")
	Pname=Request.QueryString("Pname")
	if table_name="" then Response.End 
	strsql="select top 1 *  from "+table_name        '随便取一条记录
	objres.CursorType =3
	objres.CursorLocation =3
	objres.LockType =2
	objres.Open strsql,strconn
	
	
%>
<script language="vbscript">
function result_onclick()
	document.form1.submit 
end function
</script>

<html>
<head>
<title>查询条件</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>A {
	TEXT-DECORATION: none
}
</STYLE>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="_result_Query.asp?tablename=<%=table_name%>&Pname=<%=Pname%>">
  <div align="center">
    <table style="font-size:9pt" width="300" border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td width="75" height="20" valign="bottom"> 
          <div align="center"><img src="images/find_1.gif" width="75" height="25"></div>
        </td>
        <td width="75" height="20" valign="bottom"> 
          <div align="center"> <img src="images/find_4.gif" width="75" height="25" border="0"onclick="result_onclick()"></div>
        </td>
        <td width="150" height="20"> 
          <div align="right"> </div>
        </td>
      </tr>
      <tr> 
        <td colspan="3" bgcolor="#6699FF"></td>
      </tr>
    </table>
    <table width="296" border="1" cellspacing="0" cellpadding="0" bordercolor="#6699FF" height="130">
      <tr> 
        <td> 
          <table style="font-size:9pt" width="296" border="0" cellspacing="0" cellpadding="0" bordercolor="#6699FF">
            <tr> 
              <td width="32" height="28">&nbsp;</td>
              <td width="84" height="28">&nbsp;</td>
              <td width="62" height="28">&nbsp;</td>
              <td width="102" height="28">&nbsp;</td>
            </tr>
            <tr> 
              <td width="32" height="28"> 
                <div align="center"><img src="images/search.gif" width="21" height="22"></div>
              </td>
              <td width="84" height="28"> 
                <select name="selectname1">
                  <% for i=0 to  objres.Fields.Count-1%>
                  <option value=<%=i%>><%=objres.Fields.Item(i).Name %></option>
                  <%next%>
                </select>
              </td>
              <td width="62" height="28"> 
                <select name="selectrel1">
                  <option value="0">等于</option>
                  <option value="1">不等于</option>
                  <option value="2">大于</option>
                  <option value="3">小于</option>
                  <option value="4">不大于</option>
                  <option value="5">不小于</option>
                  <option value="6">包含</option>
                  <option value="7" selected>类似</option>
                </select>
              </td>
              <td width="102" height="28"> 
                <input type="text" name="textfield1" size="12">
              </td>
            </tr>
            <tr> 
              <td width="32" height="28">&nbsp;</td>
              <td width="84" height="28">&nbsp;</td>
              <td width="62" height="28">&nbsp;</td>
              <td width="102" height="28">&nbsp;</td>
            </tr>
            <tr> 
              <td width="32" height="28"> 
                <div align="center"><img src="images/search.gif" width="21" height="22"></div>
              </td>
              <td width="84" height="28"> 
                <select name="selectname2">
                  <% for i=0 to  objres.Fields.Count-1%>
                  <option value=<%=i%>><%=objres.Fields.Item(i).Name %></option>
                  <%next%>
                </select>
              </td>
              <td width="62" height="28"> 
                <select name="selectrel2">
                  <option value="0">等于</option>
                  <option value="1">不等于</option>
                  <option value="2">大于</option>
                  <option value="3">小于</option>
                  <option value="4">不大于</option>
                  <option value="5">不小于</option>
                  <option value="6">包含</option>
                  <option value="7" selected>类似</option>
                </select>
              </td>
              <td width="102" height="28"> 
                <input type="text" name="textfield2" size="12">
              </td>
            </tr>
            <tr> 
              <td colspan="4" height="28">&nbsp;</td>
            </tr>
            <tr> 
              <td colspan="4" height="28" bgcolor="#FFFFEC"> 
                <div align="center"> 
                  <input type="radio" name="radiobutton" value="andrel" checked>
                  <font color="#FF0000">与</font>   
                  <input type="radio" name="radiobutton" value="orrel">
                  <font color="#FF0000">或</font></div>
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </div>
</form>
<div align="center"><br>
</div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -