复选框
复选框: <a href="javascript:goMatomeCommit(document.getElementsByName('list_check[]'),document.getElementsByName('qst_from_check[]'),document.frm.matome_select);"> 循环: <input name="list_check[]" type="checkbox" value="{$item->est_id},{$item->client_id}" /> js: function goMatomeCommit(obj, qst_from_check, selectbox) { var frm = document.frm; var action = false; action = boxCheck(obj, '回应'); / /查询类型 if (action) { action = qstfromCheck(obj, qst_from_check); } // if (action) { if (selectbox.value == "操作1") { frm.action = "/php/est/question/saled/input.php?mode=matome"; frm.target = "_self"; frm.submit(); }else if (selectbox.value == "操作二") { frm.action = "/php/est/question/ignore/input.php?mode=matome"; frm.target = "_self"; frm.submit(); }else { alert("请选择数据"); } } } php: if (is_array($est_info_matome)) { $count = count($est_info_matome); }else{ $count = 0; } for ($num = 0; $num < $count; $num++) { init(&$est_info_matome[$num],$est_info_matome[$num]->est_id,$client_id,$login->client_id,$answer_flg); $est_info_matome[$num]->purchase_plan_name = wordAction($est_info_matome[$num]->plan_name); } 返回处理 $est_id_tmp = explode(",",$est_id); for ($nA = 0; $nA < count($est_id_tmp); $nA ++) { $est_id_matome .= "'" . $est_id_tmp[$nA] . "'" . ($nA != (count($est_id_tmp) - 1) ? "," : ""); }