• 通过复选框批量添加内容到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: &quot;宋体&quot;">时间</div></td>
        <td width="11%" bgcolor="#999999"><div align="center" style="font-family: &quot;宋体&quot;">发表人</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>  

  • 相关阅读:
    Linux Shell脚本编程实用技巧
    Transmission在Pandorabox(Openwrt)下的交叉编译
    Pandorabox下关于vsftpd匿名访问的设置
    PandoraBox下部署阿里云(aliyun)DDNS动态域名更新(shell脚本)
    win7系统封装小记
    CF R#295 (DIV.2) E. Pluses everywhere
    CF R#295 (DIV.2) D. Cubes
    CF R#295 (DIV.2) C. DNA Alignment
    winform在线操作office--dsoframerocx第三方控件
    Dapper操作
  • 原文地址:https://www.cnblogs.com/yeye518/p/2231802.html
Copyright © 2020-2023  润新知