怎么把值赋予checkbox(帮帮忙)

x98188 2004-02-05 01:41:00
假使数据库KKK,表product里面有个字段tuijian是布尔型的,我想把数据库里面的值赋予checkbox,怎么实现啊,代码如下:(应该怎么修改下面的代码?)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("ADODB.Recordset")
sql="select * from Product"
rs.open sql,conn,3,2

%>
<body>
<table width="75%" border="1">
<tr>
<td>是否推荐:
<form name="form1" method="post" action="">
<p>
<input type="checkbox" name="checkbox" value="checkbox">
</p>
<p>
<input type="submit" name="Submit" value="提交">
</p>
</form></td>
<td> </td>
</tr>
</table>
<% rs.close
set rs=nothing
%>
</body>
</html>
...全文
31 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
jqpeng 2004-03-30
  • 打赏
  • 举报
回复
<% do while not rs.eof %>
<input type="checkbox" name="checkbox" value="checkbox" checked=<%=rs("tuijian")%>>
</p>
<p>
<% rs.movenext()
loop
%>

28,407

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧