删除复选框选中的数据,不管选中多少,传过去的值只有一个,请哪里的问题
<br>
<table width="49%" cellspacing="1" bgcolor="#0093c4" id='demotable1'><br>
<thead><br>
<tr><br>
<th width="3%"><input name="chkall" id="chkall" title="全选" onclick="chkallclick('delivery[]','chkall')" type="checkbox" /></th><br>
<th width="8%" class="style3">item code</th><br>
<th width="12%" class="style3">sku</th><br>
<th width="15%" class="style3">asin</th><br>
<th width="21%" class="style3">description</th><br>
<th width="12%" class="style3">type</th><br>
<th width="9%" class="style3">delivery areas</th><br>
<th width="10%" class="style3">account</th><br>
<th width="10%" class="style3">fnsku</th><br>
</tr><br>
</thead><br>
<tbody><br>
<?php<br>
while($row = mysql_fetch_array($result, mysql_assoc)) {<br>
?><br>
<tr><br>
<td><input type="checkbox" name="delivery[]" value="<?php echo $row['id']; ?>" /></td><br>
<td><?php echo $row['item_code'] ?></td><br>
<td><?php echo $row['sku'] ?></td><br>
<td><?php echo $row['asin'] ?></td><br>
<br>
<br>
<br>
function delclick(){ <br>
var val = $('input:checked').val(); <br>
window.location.href="http://www.php1.cn/">
<br>
} <br>
<br>
<br>
<input type="button" class="btn" id="add_btn" value="新 增" /><br>
<br>
<input name="button" type="button" class="btn" onclick="delclick()" value="删 除" /><br>
<br>
case 'del' : //删除<br>
<br>
$id=$_get["delivery"];<br>
$sql = "delete from `sku_rule` where id in($id)";<br>
$result = mysql_query($sql);<br>
if (mysql_affected_rows($conn) != 1){<br>
<br>
echo "<script>alert('删除失败!');location.href="http://www.php1.cn/">
} else {<br>
<br>
echo "<script>alert('删除成功!');location.href="http://www.php1.cn/">
}<br>
break;<br>