js页面刷新的方法location.reload()

reload 方法,该方法强迫浏览器刷新当前页面。
语法:location.reload([bForceGet])
参数: bForceGet, 可选参数, 默认为 false,从客户端缓存里取当前页。true, 则以 GET 方式,从服务端取最新的页面, 相当于客户端点击 F5("刷新")

 96 @switch_state = (entity_class, entity_id, state_attribute_name) ->
 97   $.ajax({
 98     url: '<%= switch_state_commons_path %>',
 99     type: 'put',
100     data: {'entity_class': entity_class, 'entity_id': entity_id, 'state_attribute_name': state_attribute_name}
101   }).done( ->
102     $().toastmessage('showSuccessToast', '操作成功');
103     location.reload();
104   )

 

posted @ 2015-03-02 11:33  冰凌花花~  阅读(550)  评论(0)    收藏  举报