JQuery 1.8中的location.reload不是默认值#one [英] location.reload in JQuery 1.8 not default #one

查看:84
本文介绍了JQuery 1.8中的location.reload不是默认值#one的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在早期版本的JQuery或JQTouch中,我调用了location.reload()以重新加载整个单个页面.我在重新加载项停留在我的项目的同一#abc页上时遇到了问题...我需要将其重新加载到默认的单页项目#one上

In a previous version of JQuery or JQTouch I called location.reload() to reload the full single page. I'm having an issue with the reload staying on the same #abc page of my project… I need it to reload to the default #one of single page project

推荐答案

尝试一下:

var custom_reload = function(){
    window.location.hash = '';
    window.location.reload();
}

然后:

custom_reload();

这篇关于JQuery 1.8中的location.reload不是默认值#one的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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