在google里面搜索,发现firefox下面要用location.href =‘’做跳转

一篇文章写到:

FireFox中location跳转问题开发网页的时候,又被 IE 和 Firefox 的兼容性折腾了半天,后来在百度Cache里面找到一篇原创,我整理一下,与大家共享。
FireFox中location跳转问题
FireFox中location跳转问题主要是 
FireFox中location跳转问题
FireFox中location跳转问题
FireFox中location跳转问题location.href('http://www.neten.de');
FireFox中location跳转问题
FireFox中location跳转问题在Firefox里不支持,但如果改成 
FireFox中location跳转问题
FireFox中location跳转问题
FireFox中location跳转问题window.location = 'http://www.neten.de';
FireFox中location跳转问题
FireFox中location跳转问题则在两种浏览器中都支持了。
FireFox中location跳转问题




但我发现还是不可以,最后发现一个问题,我用 <button></button>这样写的html元素,在firefox里面不认,后来改成
<input type='button' value='Test'  id='testfire' /> 
就可以了

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2018-03-15
  • 2021-10-28
  • 2022-02-23
  • 2021-11-22
  • 2022-01-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2021-09-30
  • 2022-12-23
相关资源
相似解决方案