日期:2014-05-17  浏览次数:20787 次

记录打勾得问题
我想在一个列表的前面加一个checkbox   然后点击   一个选择   然后点击一个按钮   比如修改等     怎么通过打勾然后   点击按钮   把所选的纪律   的id传过去   谢谢大家

------解决方案--------------------
<input type= "checkbox " name= "checkbox " value= "数据ID值(或不重复的唯一代表值 ">
例如:
<input type= "checkbox " name= "checkbox " value= " <%=bm( "id ")%> ">
放置在form的合适位置中
接收提交数据
id=request.form( "checkbox ")
if id= " " then
response.write "没选中数据呀呀呀! "
else
sql= "select id from userinfo where id in ( "&id& ") "
set rs=server.createobject( "adodb.recordset ")
rs.open sql,conn,1,3
if rs.recordcount <> 0 then
response.write "咱们都被选中了,来排个队先,我开始数了... <br> "
while not rs.eof
id=rs( "id ")
response.write "我是序号为: "&id& "的,该下一位了! "
response.write " <br> "
wend
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
------解决方案--------------------
严重问题,少了个rs.movenext,现在就加上。

<input type= "checkbox " name= "checkbox " value= "数据ID值(或不重复的唯一代表值 ">
例如:
<input type= "checkbox " name= "checkbox " value= " <%=bm( "id ")%> ">
放置在form的合适位置中
接收提交数据
id=request.form( "checkbox ")
if id= " " then
response.write "没选中数据呀呀呀! "
else
sql= "select id from userinfo where id in ( "&id& ") "
set rs=server.createobject( "adodb.recordset ")
rs.open sql,conn,1,3
if rs.recordcount <> 0 then
response.write "咱们都被选中了,来排个队先,我开始数了... <br> "
while not rs.eof
id=rs( "id ")
response.write "我是序号为: "&id& "的,该下一位哥们了! "
response.write " <br> "
rs.movenext
wend
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
------解决方案--------------------
把你需要提交的控件统一放到一个表单里面,提交就行,默认的form都不要的。
------解决方案--------------------
仔细参考这里面的代码,有符合你的要求
<%Response.Buffer=true%>
<html>
<head>
<title> </title>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<link rel= "stylesheet " href= "admin.css " type= "text/css ">
<!--#include file= "check.asp "-->
<!--#include file= "mdb_path_user.asp "-->
</head>
<script language= "javascript ">
//全选或全取消
function selectall(str)
{
var aa = document.getElementsByName(str);
for (var i=0; i <aa.length; i++)
aa[i].checked = true;
}
function selectfan(str)
{
var aa = document.getElementsByName(str);
for (var i=0; i <aa.length; i++)
if(aa[i].checked)
aa[i].checked=false
else
aa[i].checked=true;
}
function del_equip()
{
if(confirm( '确定删除选定设备吗!? '))
{document.xoYuStudioH.action= "equipment_list.asp ";
document.xoYuStudioH.submit();
return true;
}
return false;