if request.QueryString("action")="del" then
sql="delete * from 表 where id="&request.querystring("id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
%>
<a href="?id=<%=rs("id")%>&action=del">删除</a>
将删除放在对应的名称的后面,把ID传送到action=del的判断里 30796希望对你有帮助!
大行业(Name_HY)和大行业下的细分(Name_HYxifen)有没有什么关系,最好是将Name_HY设置为一级分类,Name_HYxifen设置为2级分类。<select name="Name_HY" onChange="changelocation(document.myform.Name_HY.options[document.myform.Name_HY.selectedIndex].value)" size="1">
<option value="" selected>所属行业</option>
<%
sql3 = "select * from TZinfoHYAttach"
rs.open sql3,conn,1,1
dim HY
HY=rs("Name_HY")
do while not rs.eof
%>
<option value="<%=trim(rs("Name_HY"))%>"><%=trim(rs("Name_HY"))%></option>
<%
rs.movenext
loop
rs.close
%>
</select>
<select name="Name_HYxifen">
<option value="" selected>行业细分</option>
<%
sql="select * from TZinfoHYAttach where Name_HY='" &HY&"'"
rs.open sql,conn,1,1
do while not rs.eof
%>
<option value="<%=rs("Name_HYxifen")%>"><%=rs("Name_HYxifen")%></option>
<%
rs.movenext
loop
end if
rs.close
<!--#include file="../conn.asp"--><!--文件conn.asp为连接数据库的代码-->
<form id="form1" name="form1" method="post" action="test.asp">
<!--action表示提交到的标单,暂时定义为 action="test.asp"-->
<table width="297" height="109" border="1" align="center">
<tr>
<td width="97" height="24">栏目名称</td>
<td width="184"><input name="ColumnName" type="text" id="ColumnName" /></td>
</tr>
<tr>
<td height="25">栏目序号</td>
<td><input name="ColumnOrder" type="text" id="ColumnOrder" /></td>
</tr>
<tr>
<td height="25">表名</td>
<td><input name="TableName" type="text" id="TableName" /></td>
</tr>
<tr>
<td height="23">首页</td>
<td><input name="FirstPage" type="text" id="FirstPage" /></td>
</tr>
</table>
<table width="300" border="0" align="center">
<tr>
<td width="297"><div align="center">
<input type="submit" name="Submit3" value="确定" />
<!--onclick为点击确定按钮触发的事件,一般用来检测提交时有无非法字符-->
<input type="reset" name="Submit22" value="取消" />
</div></td>
</tr>
</table>
</form>
'-----------------------------------------
'test.asp
'-----------------------------------------
<!--#include file="../conn.asp"-->
<%
if request.form1("form1")<>"" then '用来判断是否提交表单为空
set rs=server.createobject("adodb.recordset")
sql="select * from 书库表 where 项目1='"&trim(request.form("input标签的名字")&"'"
rs.open sql,conn,3,1
if rs.recordcount>=1 then
reponse.write "有重复项"
end if
else
arert("没有输入")
end if
rs.close
set rs=nothing
%>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)