首页 >后端开发 >php教程 >Js php多项选择删除

Js php多项选择删除

WBOY
WBOY原创
2016-07-25 08:53:351259浏览
  1. if("确认删除"){

  2. $num=$_POST['checkbox'];
  3. foreach($num as $v){
  4. $sql="delete from aa where id =".$v;
  5. $aa=mysql_query($sql);
  6. echo "";
  7. }
  8. }
  9. ?>
  10. <script><li>var checkflag = "false";<li>function check(fieldName) {<li> var field=document.getElementsByName(fieldName);<li> if (checkflag == "false") {<li> for (i = 0; i < field.length; i++) {<li> field[i].checked = true;<li> }<li> checkflag = "true";<li> return "全选";<li> <li>}else {<li> for (i = 0; i < field.length; i++) {<li> field[i].checked = false; }<li> checkflag = "false";<li> return "全选"; <li> }<li>}<li></script>
复制代码


声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn