php中script不生效

在.php中写了js,中的内容无法运行出结果,请问如何修改

<script>
    function Choice(number)
    {
        switch(num){
             case 0:
             location.href ="http://localhost/insert.php";
            break;
            case 1:
             location.href ="http://localhost/update.php";
             break;
            case 2:
             location.href ="http://localhost/delete.php";
            break;
            case 3:
             location.href ="first.html";
            break;
            }
    }
 </script>
 </head>
 <body>
 <?php
    $db=mysqli_connect("localhost","root","181128","dataone");
    if (!$db) {
        die('Could not connect: ' . mysqli_connect_error());
    }
    echo 'Connected successfully <br/>';
    mysqli_select_db($db,"dataone");
    $result = mysqli_query($db,"select *
    FROM airplanes"); 
    print"<table>";
        if(mysqli_fetch_assoc($result)==0)
        {
            echo"暂无信息";
        }
        else{
            、、、、、、、、
            }
        }
    print"</table>";
    mysqli_close($db);
    ?>
    <hr/>
    <input type="button" value="添加" onclick="Choice(0)"/>
    <input type="reset"  value="重置"/>
    <input type="button" value="修改" onclick="Choice(1)"/>
    <input type="button" value="删除" onclick="Choice(2)"/>
    <input type="button" value="退出" onclick="Choice(3)"/>
 </body>


onclick有这个事件吗?