为了账号安全,请及时绑定邮箱和手机立即绑定

使用JavaScript或HTML刷新页面

使用JavaScript或HTML刷新页面

Qyouu 2019-10-17 10:26:57
如何使用JavaScript或HTML刷新页面?
查看完整描述

3 回答

?
临摹微笑

TA贡献1982条经验 获得超2个赞

window.location.reload(); 在JavaScript中


<meta http-equiv="refresh" content="1">在HTML中(其中1= 1秒)。


查看完整回答
反对 回复 2019-10-17
?
GCT1015

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']()


查看完整回答
反对 回复 2019-10-17
?
HUX布斯

TA贡献1876条经验 获得超6个赞

window.location.reload()

应该可以工作,但是有许多不同的选择,例如:


window.location.href=window.location.href


查看完整回答
反对 回复 2019-10-17
  • 3 回答
  • 0 关注
  • 551 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信