<!--#include file="conn.asp" -->
<%
id=Request.Form("pl") '获取的ID值如: id=1, 3
nid=split(id,", ") ' 根据逗号把id分割,返回数组nid
sid=ubound(nid) '得到几个值
for i = 0 to sid 'nid(i)就是要操作的id,并做循环更新记录
set rs=server.CreateObject("adodb.recordset")
sql="select * from tools where id="&nid(i)
rs.open sql,conn,1,3
rs("MAC")=request.form("bz"&trim(nid(i)))
rs.update
rs.close
set rs=nothing
next
response.Write "<script>alert('修改成功!');location.href='index.asp';</script>"
%> |