当关闭模式对话框时,如何在Jquery中刷新页面

时间:2010-09-13 18:29:25

标签: javascript jquery jquery-selectors

我在模态中更新了一些值,并且在同一页面上打开了模态。 关闭模态如何在jquery中刷新页面

$("#dialog-modal").bind('dialogclose',function() {
  //How Do i refresh the current Page.
)};

2 个答案:

答案 0 :(得分:5)

window.location.reload(true);

答案 1 :(得分:2)

使用window.location.reload()

$("#dialog-modal").bind('dialogclose',function(){
    // force the browser to get the page from the server
    window.location.reload(true);
)}

修改

OP似乎正在寻找这个答案(来自下面的评论):

$("#dialog-modal").bind('dialogclose',function(){
    $('#someForm').submit();
)}