通过复选框批量添加内容到textarea
<%
set rs=server.createobject("adodb.recordset")
sql="select * from workrep where username=" &
sqlstr(name)
rs.open sql,conn,1
if not rs.eof and not rs.bof then
%>
<table
width="99%" border="1" align="left" cellpadding="1" cellspacing="1"
bordercolor="#000000">
<tr>
<td
width="30%" bgcolor="#999999"><div
align="center">工作任务</div></td>
<td
width="14%" bgcolor="#999999"><div align="center"
style="font-family:
"宋体"">时间</div></td>
<td
width="11%" bgcolor="#999999"><div align="center"
style="font-family:
"宋体"">发表人</div></td>
<td
width="10%" bgcolor="#999999">任务类别</td>
<td
width="11%" bgcolor="#999999">考核分值</td>
<td
width="10%" bgcolor="#999999">上级评分</td>
<td
width="10%" bgcolor="#FFFFFF"><label>
<input name="Submit2" type="submit" id="Submit2"
value="加入">
</label>
<label></label></td>
</tr><%
while not rs.eof and not rs.bof
%>
<tr>
<td><a
href="javascript:openwin('displayworkrec.asp?username=<%=rs("username")%>&recdate=<%=rs("recdate")%>');"><%=rs("title")%></a></td>
<td><%=rs("recdate")%>
</td>
<td><%=rs("username")%> </td>
<td><%=rs("jclass")%></td>
<td><%=rs("fenzhi")%></td>
<td><%=rs("fenzhi")%></td>
<td
width="10%" bgcolor="#FFFFFF"><input type="checkbox"
name="checkbox" value="<%=rs("id")%>"></td>
<%
rs.movenext
wend
%> </tr>
</table>
<p>
<%else
set rs=server.createobject("adodb.recordset")
sql="select * from workrep "
rs.open sql,conn,1
if not rs.eof and not rs.bof then
%>
</p>
<table width="64%" border="1" align="left" cellpadding="1"
cellspacing="1" bordercolor="#000000">
<tr>
<td
width="100%"><%=name%><span style="color:
#FF0000">本月没有工作任务</span></td>
</tr>
</table>
<%
end if
%>
<%
end if
%>
</td>
</tr>
<tr>
<td height="10" colspan="3" bgcolor="#FFFFFF"><p>
<%
if request("Submit2")="加入" and
request("checkbox")<>"" then
idno=request("checkbox")
idno=split(idno,",")
%>
<textarea name="checkcommment" cols="100"
rows="5"><%
for i=0 to ubound(idno)
set rs=server.createobject("adodb.recordset")
sql = "select * from workrep where id=" & clng(idno(i))
rs.open sql,conn,1
title=rs("title")&chr(32)&chr(32)+"完成情况:"+rs("remark")&chr(32)&chr(32)+"考核分值:"+rs("fenzhi")
&chr(32)
&chr(32)+"上级评分:"+rs("fenzhi")&chr(10)
%>工作任务<%=i%>:<%=server.htmlencode(title)%>
<%next
end if%>
</textarea>