js报错:www.ibytx.com/tag/77/" title="查看含有 http 标签的文章" target="_blank">https://www.ibytx.com/tag/213/" title="查看含有 href 标签的文章" target="_blank">href="https://www.ibytx.com/tag/3169/" title="查看含有 window 标签的文章" target="_blank">window.location.href is not a function是由于写法问题以及浏览器不兼容导致的,具体解决方法如下:
错误js写法:
window.location.href ("http://www.02405.com/");
正确js写法:
window.location.href = "http://www.02405.com/";
上面的正确js写法可以兼容绝大部分浏览器,但是在某些版本的firefox浏览器下仍然可能报错,解决办法是采用下面的写法:
window.location = "http://www.02405.com/";

博悦天下










