Kill Thunder Dog jquery---49 single selection, reverse election, all do not select the actual combat database information

Source: Internet
Author: User
Tags echo date

<!DOCTYPE HTML><HTML>    <Head>        <MetaCharSet= "Utf-8">        <title></title>        <styletype= "Text/css">Table{width:800px;Height:1px solid Red;Border-collapse:collapse;        }Table TR th,table TR TD{Border:1px solid Red;size:12px;        }        </style>        <Scriptsrc= "Js/jq8.js"></Script>        <Script>            //The JQ test environment is problematic in the 1.8.3,2.x versionjQuery.fn.extend ({qx:function(){                     This. attr ('checked',true); }, BX:function(){                     This. attr ('checked',false); }, FX:function(){                     for(varI=0; I< This. Length;i++){                        if( This[i].checked== true){                             This[i].checked= false; }Else{                             This[i].checked= true;            }                    }                }            }); $(function(){                $('#btnqx'). Bind ('Click',function(){                    $(': CheckBox'). QX ();                }); $('#btnbx'). Bind ('Click',function(){                    $(': CheckBox'). BX ();                }); $('#btnfx'). Bind ('Click',function(){                    $(': CheckBox'). FX ();            });        }); </Script>    </Head>    <Body>        <formAction=""Method= "POST">            <Table>                <TR>                    <th>Number</th>                    <th>Account</th>                    <th>Registration time</th>                    <th>Operation</th>                </TR>                <?php mysql_connect (' localhost ', ' root ', ') or Die (' Database connection failed ');                    mysql_select_db (' xsphp ');                    Mysql_set_charset (' UTF8 ');                    Assemble the SQL statement $sql = ' select * from admin limit 10 ';                    $res = mysql_query ($sql); while ($row = Mysql_fetch_assoc ($res)) {?>                <TR>                    <TD><?php echo $row [' id '];?></TD>                    <TD><?php echo $row [' username '];?></TD>                    <TD><?php echo Date (' y-m-d h:i:s ', $row [' addtime ']);?></TD>                    <TD><inputtype= "checkbox"name= "id[]"value= "<?php echo $row [' id '];?>" /></TD>                </TR>                <?php}?>                <TR>                    <TDAlign= "Right"colspan= "4">                        <inputtype= "button"ID= "BTNQX"value= "Select All">                        <inputtype= "button"ID= "BTNBX"value= "All is not selected">                        <inputtype= "button"ID= "Btnfx"value= "Reverse Selection">                        <inputtype= "Submit"name= "Sub"ID= "Btnok"value= "Bulk Delete">                    </TD>                </TR>            </Table>        </form>    </Body></HTML><?php if ($_post[' Sub ']) {$id = $_post[' id '];        $ids = Implode (', ', $id);        Bulk Delete $sql = "Delete from admin where ID in ($ids)";    Echo $sql; }?>

Kill Thunder Dog jquery---49 single selection, reverse election, all do not select the actual combat database information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.