一般我们的页面跳转都使用,window.location.reload()。
但在firefox,opera这样不行,替代使用window.location.href="";就可以了
另外用 <meta http-equiv="refresh" content="0;url=all_topic.action">也可以
| <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <meta http-equiv="refresh" content="0;url=all_topic.action"> </head> <body onload="window.location.href='all_topic.action';"> </body> </html> |
本文介绍在Firefox和Opera浏览器中页面跳转无法使用window.location.reload()时,可以采用的替代方法,包括使用<meta>元素设置刷新URL以及HTML代码中的onload属性实现页面自动跳转。

78

被折叠的 条评论
为什么被折叠?



