3 回答
TA贡献1982条经验 获得超2个赞
window.location.reload(); 在JavaScript中
<meta http-equiv="refresh" content="1">在HTML中(其中1= 1秒)。
TA贡献1827条经验 获得超4个赞
这是使用javascript 重新加载页面的535种方法,非常酷:
以下是前20个:
location = location
location = location.href
location = window.location
location = self.location
location = window.location.href
location = self.location.href
location = location['href']
location = window['location']
location = window['location'].href
location = window['location']['href']
location = window.location['href']
location = self['location']
location = self['location'].href
location = self['location']['href']
location = self.location['href']
location.assign(location)
location.replace(location)
window.location.assign(location)
window.location.replace(location)
self.location.assign(location)
最后10个:
self['location']['replace'](self.location['href'])
location.reload()
location['reload']()
window.location.reload()
window['location'].reload()
window.location['reload']()
window['location']['reload']()
self.location.reload()
self['location'].reload()
self.location['reload']()
self['location']['reload']()
TA贡献1876条经验 获得超6个赞
window.location.reload()
应该可以工作,但是有许多不同的选择,例如:
window.location.href=window.location.href
添加回答
举报