单击jquery弹出按钮时重定向到另一个页面

时间:2014-02-23 07:07:40

标签: javascript jquery

我使用jquery popup来显示我的网页中的消息。现在我想点击jquery popup的按钮时重定向到另一个页面。我不知道该怎么做。

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"></script>
<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/start/jquery-ui.css"
    rel="stylesheet" type="text/css" />
<script type="text/javascript">
    function ShowPopup(message) {
        $(function () {
            $("#dialog").html(message);
            $("#dialog").dialog({
                title: "Mandirdarsan Warning",
                buttons: {
                    Ok: function () {
                        $(this).dialog('ok');
                    }
                },
                modal: true
            });
        });
    };
</script>

1 个答案:

答案 0 :(得分:1)

Ok: function () {
  window.location="newurl";
}
相关问题