• 前台页面获取checkbox值 例子


    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="mian_b_bg">
    <tr>
    <td width="3%" class="mian_b_bg_lm"><input name="" type="checkbox" value="">&nbsp;</td>
    <td width="11%" class="mian_b_bg_lm"><span></span>排序ID</td>
    <td width="15%" class="mian_b_bg_lm"><span></span>名称</td>
    <td width="40%" class="mian_b_bg_lm"><span></span>电话</td>
    <td width="40%" class="mian_b_bg_lm"><span></span>操作</td>
    </tr>
    <tr>
    <td>
    <c:forEach var="list" items="${userList}">
    <tr>
    <td><input name=id type="checkbox" value="${list.id}">&nbsp;</td>
    <td>${list.id}</td>
    <td>${list.useraccount}</td>
    <td>${list.usermobile}</td>
    <td width="8%" class="mian_b_icon_01"><a href="toUpdate.do?id=${list.id}">编辑</a></td>
    </tr>
    </c:forEach>
    </td>
    <td>
    </tr>
    </table>

    <script type="text/javascript">

    function del() {
    var value = document.body.querySelectorAll("input[type='checkbox']");
    for (var i = 0; i < value.length; i++) {
    if (value[i].checked) {
    var temp = value[i].value;
    if (temp != null) {
    if (confirm("确定要删除吗")) {

    location.href = "delete.do?id=" + temp;

    }
    }

    }
    }

    }
    </script>

  • 相关阅读:
    图标图片1
    korGE打包注意事项
    书摘1011
    ffmpeg转流rtp转udp
    ffmpeg文档
    ffmpeg http 推流服务器
    cpp笔记
    搭建shAadowsoacks 错误
    ffmpeg 开发板推流到ubuntu和pc
    gstreamer笔记
  • 原文地址:https://www.cnblogs.com/ll0405/p/8251432.html
Copyright © 2020-2023  润新知