Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/235.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jQuery中detele函数的动画问题_Javascript_Php_Jquery_Mysql_Ajax - Fatal编程技术网

Javascript jQuery中detele函数的动画问题

Javascript jQuery中detele函数的动画问题,javascript,php,jquery,mysql,ajax,Javascript,Php,Jquery,Mysql,Ajax,我有以下脚本: index.php <?php include("db.php"); ?> <html> <head> <title>Title</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script&

我有以下脚本:

index.php

<?php include("db.php"); ?>
<html>
    <head>
        <title>Title</title>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>
    </head>
    <body>
        <div align="center">
            <table cellpadding="0" cellspacing="0" width="500px">

            <?php $sql = "SELECT * FROM items ORDER BY ID DESC";
              $items= mysql_query($sql);
              while ($item= mysql_fetch_array($items)){
                  $id = $item[ID]; ?>       

                  <tr style="border: solid 4px red;">
                      <td>
                          <div class="<?= $id ?>">
                              <button class="my-btn" type="button" value="<?= $id ?>">BUTTON <?= $id ?></button>
                          </div>
                      </td>
                  </tr>

            <?php } ?>

            </table>
            <div id="flash" align="left"  ></div>
            <ol  id="update" class="timeline"></ol>
            <div id="old_updates"></div>
        </div>

        <script src="script.js"></script>
    </body>
</html>
<?php
    include('db.php');
    if(isSet($_POST['not'])) {
        $not    = $_POST['not'];
        mysql_query("insert into items (name) values ('$not')");
        $sql_in = mysql_query("SELECT wave, ID FROM actions order by ID desc");
        $r      = mysql_fetch_array($sql_in);
        $msg    = $r['name'];
        $id     = $r['ID'];
    }
?>

<li class="bar<?php echo $msg_id; ?>">
    <div align="left">
        <span style=" padding:10px"><?php echo $msg; ?> </span>
        <span class="delete_button">
            <a href="#" id="<?php echo $id; ?>" class="delete_update">X</a>
        </span>
    </div>
</li>
<?php
    include("db.php");
    if($_POST['msg_id']) {
        $id  = $_POST['msg_id'];
        $id  = mysql_escape_String($id);
        $sql = "delete from items where ID='$id'";
        mysql_query( $sql);
    }
?>
更新_data.php

<?php include("db.php"); ?>
<html>
    <head>
        <title>Title</title>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>
    </head>
    <body>
        <div align="center">
            <table cellpadding="0" cellspacing="0" width="500px">

            <?php $sql = "SELECT * FROM items ORDER BY ID DESC";
              $items= mysql_query($sql);
              while ($item= mysql_fetch_array($items)){
                  $id = $item[ID]; ?>       

                  <tr style="border: solid 4px red;">
                      <td>
                          <div class="<?= $id ?>">
                              <button class="my-btn" type="button" value="<?= $id ?>">BUTTON <?= $id ?></button>
                          </div>
                      </td>
                  </tr>

            <?php } ?>

            </table>
            <div id="flash" align="left"  ></div>
            <ol  id="update" class="timeline"></ol>
            <div id="old_updates"></div>
        </div>

        <script src="script.js"></script>
    </body>
</html>
<?php
    include('db.php');
    if(isSet($_POST['not'])) {
        $not    = $_POST['not'];
        mysql_query("insert into items (name) values ('$not')");
        $sql_in = mysql_query("SELECT wave, ID FROM actions order by ID desc");
        $r      = mysql_fetch_array($sql_in);
        $msg    = $r['name'];
        $id     = $r['ID'];
    }
?>

<li class="bar<?php echo $msg_id; ?>">
    <div align="left">
        <span style=" padding:10px"><?php echo $msg; ?> </span>
        <span class="delete_button">
            <a href="#" id="<?php echo $id; ?>" class="delete_update">X</a>
        </span>
    </div>
</li>
<?php
    include("db.php");
    if($_POST['msg_id']) {
        $id  = $_POST['msg_id'];
        $id  = mysql_escape_String($id);
        $sql = "delete from items where ID='$id'";
        mysql_query( $sql);
    }
?>


$msg_id在哪里定义<代码>echo$msg\u id哦。这就是问题所在。非常感谢。