zoukankan      html  css  js  c++  java
  • 通过复选框批量添加内容到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>  

  • 相关阅读:
    不相交集实现实例
    TQ2440开发板挂载U盘出现乱码
    快速选择实例
    linux2.6.30.4内核移植(7)——插入hello world驱动模块
    linux2.6.30.4内核移植(6)——移植应用程序hello world常见的错误:-bin/sh ./hello not found
    linux2.6.30.4内核移植(5)——构建根文件系统(yaffs文件系统格式的镜像)
    linux2.6.30.4内核移植(4)——完善串口驱动
    linux2.6.30.4内核移植(3)——yaffs文件系统移植
    linux2.6.30.4内核移植(2)——Nand Flash驱动移植
    快速排序实例
  • 原文地址:https://www.cnblogs.com/yeye518/p/2231802.html
Copyright © 2011-2022 走看看