Home > Backend Development > PHP Tutorial > Js php multiple selection delete

Js php multiple selection delete

WBOY
Release: 2016-07-25 08:53:35
Original
1258 people have browsed it
  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> <li>var checkflag = "false";</li> <li>function check(fieldName) {</li> <li> var field=document.getElementsByName(fieldName);</li> <li> if (checkflag == "false") {</li> <li> for (i = 0; i < field.length; i++) {</li> <li> field[i].checked = true;</li> <li> }</li> <li> checkflag = "true";</li> <li> return "全选";</li> <li> </li> <li>}else {</li> <li> for (i = 0; i < field.length; i++) {</li> <li> field[i].checked = false; }</li> <li> checkflag = "false";</li> <li> return "全选"; </li> <li> }</li> <li>}</li> <li></script>

复制代码


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template