如何在jQuery中重定向页面? [英] How do I redirect a page in jQuery?

查看:137
本文介绍了如何在jQuery中重定向页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该如何从服务器回显哪些数据以不加约束的方式重定向我的页面?说,假设这是我的jQuery:

How what data should I echo from the server to ajaxically redirect my page? Say, suppose this my jQuery:

$.ajax({
            type: "POST",
            url : '<?php echo base_url() ?>Admin/AddNotice',
            data: {noticeTitle: $('#title').val(),noticeDesc : $('#desc').val() },
            success: function(msg){
                //here i want to redirect..fill in the blank please.
            }
        });

推荐答案

这很简单:

window.location = "http://www.google.com";

;)

这篇关于如何在jQuery中重定向页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆