Ajax页面跳转

<script type="text/javascript" >
    $(document).ready(function () {
            $(".btnOrder1").click(function () {
                var id = $(this).attr("title");
                       var oper = "check";
                       $.ajax({
                           type: "post",
                           url: "dMenuPage.aspx",
                           data: "&id=" + id ,
                           dataType: "Text",
                           success: function (data) {
                              window. location.href ='dShopCart.aspx';
                           }
                    });
             });
     });

</script>

如果要传递参数则window.location.href ='dShopCart.aspx?id='+id;

上一篇:个人网站对xss跨站脚本攻击(重点是富文本编辑器情况)和sql注入攻击的防范


下一篇:mysql导入excel表格