html table中嵌入checkbox实现全选

<%@page import="com.smg.domain.OrderDetail"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="java.sql.PreparedStatement"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.DriverManager" %>
<%@ page import="java.sql.ResultSet" %>
<%@ page import="java.sql.Statement" %>


<%
	Connection ct = null;
	PreparedStatement ps = null;
	ResultSet rs = null;
	String DRIVER = "com.mysql.jdbc.Driver";
	String URL = "jdbc:mysql://localhost:3306/smg";
	String USERNAME = "root";
	String PASSWD = "root";
	
	List orderDetailList = new ArrayList(); 
	String doflag  = request.getParameter("doflag");
	if(doflag==null||doflag.length()==0) {
		try {
			Class.forName(DRIVER);
			ct = DriverManager.getConnection(URL, USERNAME, PASSWD);
			
			String orderIds = request.getParameter("orderIds");
			if(null != orderIds && !orderIds.isEmpty()) {
	System.out.println(orderIds.length());
	System.out.println(orderIds);
				StringBuilder sb = new StringBuilder();
				String str = "(";
				for(int i=0;i









我的订单

<% if(null != orderDetailList && orderDetailList.size() != 0) { for(OrderDetail orderDetail : orderDetailList) { %> <% if(orderDetail.getFlag() == 1) { %> <% } else if(orderDetail.getFlag() == 0) { %> <% } %> <% } } %>
orderId name address
<%=orderDetail.getOrderId() %> <%=orderDetail.getName() %> <%=orderDetail.getAddress() %>

你可能感兴趣的:(servlet/jsp)