js传值至php后台及php中header()函数,实现跳转

来源:互联网 发布:网络艺人公司招聘 编辑:程序博客网 时间:2024/05/07 07:09

js传值至php后台及php中header()函数,实现跳转:

1. <script type="text/javascript">
        function run_select(id){                    
                alert("您确定要删除此用户?");
                window.location = "management_new_handle_del.php?ART=art1&ID1= "+id;
         }
    </script>

*说明:在js中,我们通过window.location来赋值链接/变量,在php后台通过$id=$_REQUEST["ID1"];获取变量ID1=id,即id的值。


2.//header()函数,实现跳转

    header("location:login.html");

*说明:php中的header函数,可以跳转至指定页面,包括html、php页面。




0 0