php 循环的复选框怎么取值

来源:百度知道 编辑:UC知道 时间:2024/04/30 14:00:48
<?php
include("jink.php");
$sqlall="select * from b1";
$queryall=mysql_query($sqlall);
while($arrayall=mysql_fetch_array($queryall)){
?>
<tr>
<td height="29"><?php echo $arrayall['id']?></td>
<td><?php echo $arrayall['yhm']?></td>
<td align="center"><input name="sqt" type="checkbox" id="sqt" value="checkbox"></td>
</tr>
<?php
}
?>
能选中多条 同时删除!
value="checkbox" 里面放什么值呀???

这是全部选取和反选的代码可以用在php中
<form name=batch>
<input type=checkbox>
<input type=checkbox>
<input type=checkbox>
<input type=checkbox>
<input type=checkbox>
<input type=checkbox>
<input type=button value="全选" onclick=selectAll(document.batch)>
<input type=button value="反选" onclick=selectOther(document.batch)>
<input type=reset value="取消">
<script>
function selectAll(obj)
{
for(var i = 0;i<obj.elements.length;i++)
if(obj.elements[i].type == "checkbox")
obj.elements[i].checked = true;
}
function selectOther(obj)
{
for(var i = 0;i<obj.elements.length;i++)
if(obj.elements[i].type == "checkbox" )
{
if(!obj.elements[i].checked)
obj.elements[i].checked = true;
else
obj.